Ken
Ken

Reputation: 11

upload_max_filesize not reflected in phpinfo()

In my php.ini file (there is only one on the system) I have

post_max_size = 8M
upload_max_filesize = 8M
upload_max_size = 8M

Originally they were set to 2M. I changed them to 8M restarted apache, even restarted instance. But when I do a phpinfo() on it, it still shows 2M.

I am pretty sure I have the right php.ini file because if I increase the max_execution_time it is reflected in the phpinfo() but anything I put in for upload_max_filesize and post_max_size is not reflected in phpinfo() even though I double check php.ini and the settings are there.

This is a AWS Linux instance. php5.2.16 apache 2.2.17(EL)

Any thoughts from the guru’s out there?

Upvotes: 1

Views: 2259

Answers (3)

Chirag Kalani
Chirag Kalani

Reputation: 458

Please check if your php.ini file don't have any errors. php.ini takes all default values after error line.

I was having same issue, I fixed after removing errors from php.ini.

Hope this help.

Upvotes: 0

Beachhouse
Beachhouse

Reputation: 5052

If you are running in a local server, such as wamp or xampp, make sure it's using the php.ini you think it is. These servers usually default to a php.ini that's not in your html docs folder.

Upvotes: 0

Jonathan M
Jonathan M

Reputation: 17451

Do you have entries in Apache's .htaccess file that are overwriting the options?

They would look something like:

php_flag post_max_size 2M
php_flag upload_max_filesize 2M
php_flag upload_max_size 2M

Here's Apache's .htaccess documentation: http://httpd.apache.org/docs/1.3/howto/htaccess.html

Upvotes: 0

Related Questions