Big file upload errors using PHP

I have an image upload for a slide show, and users are constantly uploading files of 2 MB plus. Files of this size work fine, but files of size cause what looks like a browser timeout.

Here are my php ini settings:

  • Maximum memory allocation: 12M
  • Maximum file upload size: 10M
  • Maximum HTTP Message Size: 10M
  • Maximum lead time: 60
  • Maximum Parsing Time: 120

These parameters are in the configuration file itself, and I can change them directly. Changes appear when using phpinfo ().

I am running Apache server and php 4.3.9 (client choice, not mine). The apache server request limit is set to the default value, which, it seems to me, is about 2 GB?

When I use the Firebug network monitor, it seems that I am not getting a full response from the server, although I am not too versed in using this tool. It seems that the time is about 43 seconds.

All the help I can find on the network points to the above settings as the culprits, but all these settings are much higher than this 2 MB file and the 43 second timeout.

Any suggestions that I can go from here to solve this problem?

Below are the relevant php ini settings from phpinfo (). Let me know if I need to post more.

  • file_uploads On On
  • max_execution_time 60 60
  • max_input_nesting_level 64 64
  • max_input_time 120 120
  • memory_limit 12M 12M
  • post_max_size 10M 10M
  • safe_mode off Off
  • upload_max_filesize 10M 10M
  • upload_tmp_dir no value no value
+2
4

, php.ini : display_errors = On; , . () .

, memory_limit. , , , .

+2

? .htaccess, Apache .

phpinfo(), :

<?php
  phpinfo();
?>
0

, .

POST , . AFAIK, .

0

, -, , Apache 1: Apache 1 .htaccess .

Java applett, (Google it). , .

This is a guaranteed timeout fix and has the added benefit of allowing users to pause and resume downloads, see progress, etc.

(Flash downloaders do not have this advantage.)

0
source

Source: https://habr.com/ru/post/1765848/


All Articles