Linux – upload_max_filesize not getting updated after httpd restart

apache-2.2linuxPHP

I have a RHEL6 box with php and apache. I want to increase my upload limit to 20MB. I changed upload_max_filesize parameter in /etc/php.ini. I restarted the httpd service. But when I load the php_info() page, I still see a upload_max_filesize of 2MB (the default value).

I have SELinux enabled, but I don't see any recent "avc" entries in /var/log/audit/audit.log (though I have some from a few days ago). Is there another .ini file I must change? How can I get an upload_max_filesize value to stick?

Best Answer

Make sure to edit the right php.ini file. Run the following command to find the right config file -

php -i | grep php.ini

The output will show you the Loaded Configuration File and modify the upload_max_filesize there.