How can I prevent large Apache / PHP file downloads from crashing?

I recently installed the PHP download portal on one of our servers. Everything works fine, but users cannot upload large files (~ 20 MB).

I set the following settings to extremely large values ​​or unlimited:

memory_limit
upload_max_filesize
post_max_size
memory_limit

Full php.inihere: http://pastebin.com/NrqJvMVM

But it still does not work after restarting the server.

Am I missing settings? Do I need to update any values ​​in Apache configuration? Can a company's firewall somehow interfere with this?

EDIT: I checked phpinfo () and the main configuration still shows old values. However, the C: \ Windows \ php.ini configuration file has new values. I am using the wrong configuration file.

+5
8

script. , :

  • max_execution_time = ini_set ( "max_execution_time", "-1" );
  • post_max_size = ini_set ( "post_max_size", "200M" );
  • memory_limit = ini_set ( "memory_limit", "200M" );
  • upload_max_filesize = ini_set ( "upload_max_filesize", "200M" );

.htaccess:

php_value upload_max_filesize 200M

php_value memory_limit 256M

php_value max_execution_time 18000

: http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/ | https://www.dokuwiki.org/faq:uploadsize

Suhosin fcgi; -)?

+14

php.ini. apache .htaccess .

, -

  • file_uploads
  • upload_max_filesize
  • max_input_time
  • memory_limit
  • max_execution_time
  • post_max_size

.

  • upload_max_filesize post_max_size

    - , "multipart/form-data". Post_max_size , script . , upload_max_filesize.

    , upload_max_filesize - , . post_max_size - upload_max_filesize mime, . , , , .

    PHP MAX_UPLOAD_LIMIT HTML-, .

  • memory_limit

    PHP POST, . - , --enable-memory-limit . , , , , , , .

  • max_execution_time max_input_time

    script , script . , max_input_time . ini max_input_time, set_time_limit() .

  • Apache

    - apache LimitRequestBody, POST -. RPM 512Kb. .

  • -, perl java-. PHP -, perl Java , .

. :

+6

, . params .htaccess

+3

post_max_size , 0, - 9999M, .

+2

.

, phpinfo() , . Configuration File (php.ini) Path Loaded Configuration File .

+2

, MAX_FILE_SIZE ...

<form enctype="multipart/form-data" action="index.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="50000" />
<input name="filedata" type="file" />
<input type="submit" value="Send file" />
</form>
+1

php.ini =)

+1

, , , , . : http://www.plupload.com/

Very comfortable and efficient. It works with various technologies, so it can work on most machines for customers. (flash, silverlight, html5 file api aso ...) Hurray!

+1
source

All Articles