File Upload Size

How to increase the max. file upload size for Apache web server and MySQL

Apache Web Server

There are three settings on the web server which determine or influence the maximum file upload size.

 

The settings are defined either in the php.ini or in the .htaccess file on the web server.
See also: http://php.net/manual/en/ini.core.php

 

The value of post_max_size must be higher than the value of upload_max_filesize.
The value of memory_limit must be higher than the value of post_max_size.

memory_limit > post_max_size > upload_max_filesize

 

You should also note the following settings:

MySQL

If the uploaded file is to be inserted into a MySQL database (as BLOB), the following settings are also relevant:

  • max_allowed_packet
  • innodb_log_file_size

 

The settings are defined in the MySQL config file my.cnf (my.ini on Windows).
See also: https://dev.mysql.com/doc/

 

The value of innodb_log_file_size must be higher than the value of max_allowed_packet.

innodb_log_file_size > max_allowed_packet

Disclaimer: The information on this page is provided "as is" without warranty of any kind. Further, Arclab Software OHG does not warrant, guarantee, or make any representations regarding the use, or the results of use, in terms of correctness, accuracy, reliability, currentness, or otherwise. See: License Agreement