Maximum upload file size for PHP
is bound to the lowest value of both post_max_size
and upload_max_filesize
directives in your configuration. post_max_size
affects maximum file upload size as file upload is normally an HTTP
POST
operation.
post_max_size
Maximum size of POST data that PHP will accept.
Its value may be 0 to disable the limit.
It is ignored if POST data reading is disabled through enable_post_data_reading
.
upload_max_filesize
Maximum allowed size for uploaded files.
You can update your PHP
configuration file for these two directives to the values that fit your requirement and then restart your web server.
The following example allows for file upload of not more than 200MB.
post_max_size = 200M upload_max_filesize = 250M
Alternatively, you can add the following lines in your .htaccess
and the setting will apply to scripts from within the .htaccess
‘ directory.
php_value upload_max_filesize 200M php_value post_max_size 250M
Restart Apache
for the changes to take effect.