Reputation: 1
i have simple script for upload files, if i upload file <500Kb everything is working fine, but when i upload bigger file $_FILES['upload']['error'] return me 1. I know that mean file exceeds the upload_max_filesize, but i set in .htacces php_value post_max_size 999999M and check ini_get('post_max_size') return me 999999M. But script still don't work with file ~4MB let alone bigger file.
At the end, sorry for my eng (is not main basic lang)
Upvotes: 0
Views: 171
Reputation: 1103
By default, the maximum upload file size for PHP scripts is set to 128 megabytes. However, you may want to change these limits. You can set a limit by changing the upload_max_filesize and post_max_size directives in your php.ini file.
To ensure that file uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following settings demonstrate how to set a file upload limit to 20 megabytes:
upload_max_filesize = 20M
post_max_size = 21M
Upvotes: 1