Bear in mind, I am no sysadmin, I am just a developer. I cannot find anyone with the exact problem as me, just similar, and none of their "fixes" seem to work.
I am currently running an Amazon EC2 instance running.
CentOS 6.2
Nginx 1.2.2
PHP 5.3.16 with APC
Percona 5.5.24 // not currently using this as I am using an RDS
I have set my php.ini (/etc/php.ini) settings to the following
upload_max_filesize=10M
post_max_filesize=20M
After reloading the config, using php -i
via ssh, these settings seemed to be loaded. Showing upload_max_filesize=10M
, etc.
When using phpinfo()
or ini_get
, both options are returned as 4M
phpinfo()
indicates that the file I am editing is the one loaded (/etc/php.ini
).
I have also run php -i | grep "\.ini"
to check which files are loaded, and there are no unnecessary loaded configs. I even went through each loaded file individually to check they didn't have the settings inside.
Additionally, I have been suggested to try using a .user.ini
config file. This did not change the values either.
ini_set()
does not work either.
I'm at a bit of a loss.
EDIT: not sure this will help, but I am using this AMI http://megumi-cloud.com/
Navigate to your php. Locate the upload_max_filesize and increase it by changing its number. You can also boost a few other limitations, as shown below: upload_max_filesize = 256M post_max_size = 256M memory_limit = 512M max_execution_time = 180. Save the file, and that's it. The error should no longer occur.
If you left click on the WAMP icon in the status bar, select the PHP menu and then click on the php. ini file in that menu. Just open it in Notepad is fine. Then in Notepad, do a search (CTRL+F) for "upload_max_filesize", and then you can change the value that is set there.
In order to fix this error, you need to increase the file size upload limit. That is, you need to increase the value of the upload_max_filesize directive in your php. ini file.
Filename:
nginx/sites-available/default
Add:
location ~ \.php$ {
fastcgi_param PHP_VALUE "upload_max_filesize = 50M \n post_max_size=51M";
}
Run:
From command line: sudo service nginx restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With