apache - PHP upload_max_filesize not obeyed
/etc/php.ini is not obeying upload_max_filesize
<?php echo phpinfo(); ?> I can see that the 'Loaded Configuration file' is /etc/php.ini
Within this file I have the values:
file_uploads = On upload_max_filesize = 12M post_max_size = 12M
BUT the phpinfo(); shows upload_max_filesize 2M
After restarting Apache serveral times this value is never obeyed whatever I change the upload_max_filesize and max_post_size.
I have worked around this issue by using a .htaccess directive
php_value upload_max_filesize 12M php_value post_max_size 12M
This has allowed the upload value to be changed and the PHPINFO() now shows the value correctly.
Directive Local Value Master Value upload_max_filesize 12M 2M
The question is: why is the /etc/php.ini file not being obeyed in the first place?
Running CentOs 5.4 , php 5.3.29
grep -inr '2M' *) in
/etc/php.d/* with nothing found.
Why is it not listening to the main php.ini file which it says it's using?
Already looked at PHP upload_max_filesize
on SO with no success.
grep -inr 'upload_max_filesize in /etc/*.ini and .conf with only the 12M value being returned.
Searched /etc/httpd/conf/ /etc/httpd/conf.d/ and obviously the root of the virtual host. No special setup in virtual hosts with grep returning 0 results.
Additional .ini files parsed /etc/php.d/bcmath.ini, /etc/php.d/curl.ini, /etc/php.d/dom.ini, /etc/php.d/fileinfo.ini, /etc/php.d/gd.ini, /etc/php.d/intl.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/posix.ini, /etc/php.d/soap.ini, /etc/php.d/suhosin.ini, /etc/php.d/sysvmsg.ini, /etc/php.d/sysvsem.ini, etc/php.d/sysvshm.ini, /etc/php.d/wddx.ini, /etc/php.d/xdebug.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini