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/
I got in contact with the guys who made the AMI and found out there are additional configuration files that override the php.ini
There are 2 files which hold settings
/etc/php-fpm.d/www.conf // This is the file which holds upload_max_filesize and post_max_size, among others
/etc/php-fpm.conf
Obviously the locations may differ on different configurations, but hopefully this will help give someone an idea of what else to look for.