Unable to change upload_max_filesize and post_max_size

I'm developing PHP web applications on OS X 10.7.3 and when trying to change the upload_max_filesize and post_max_size on /etc/php.ini then restart Apache the values do not change in my phpinfo, they stay at the default values:


post_max_size = 8M

upload_max_filesize = 2M


I tried changing permissions on php.ini.default from 444 to 755, then changing both upload_max_filesize and post_max_size inside php.ini.default, then restart Apache and nothing. There's got to be some other .ini somehwere that's controlling this, but there's no .ini in the web directory I'm trying to access, there's no .user.ini anywhere.


I did change the memory_limit from the default 128M to 512M and that worked fine. I'm not sure why the upload and post size values don't change. Any help would be appreciated.


Thanks!

Posted on Mar 30, 2012 6:37 AM

Reply
4 replies

Mar 30, 2012 11:33 AM in response to maskeda

I did mdfind php.ini | grep /etc and it only found:


/private/etc/php.ini.default

/private/etc/php.ini


Doing mdfind php.ini | grep php.ini returned:


/private/etc/php.ini.default

/private/etc/php.ini

/Library/Application Support/appsolute/MAMP PRO/conf/php.ini

/Applications/MAMP/bin/php/php5.2.17/conf/php.ini

/Applications/MAMP/bin/php/php5.3.6/conf/php.ini

/Applications/MAMP/bin/php/php5.3.6/conf/php.ini.temp

/Applications/MAMP/bin/php/php5.2.17/conf/php.ini.temp


Without grep it returned a huge list of stuff, including stuff in Mail that didn't really have php.ini in it.


I'm going to try to uninstall MAMP and see if that fixes the problem. I doubt it cause MAMP runs from a different location, but it's worth the try. Thanks for the advice, I'll let you know what happens.

Apr 1, 2012 11:45 AM in response to bisteck

I've removed MAMP and I the only php.ini files are:


locate php.ini


/private/etc/php.ini

/private/etc/php.ini.default


When changing the values for upload_max_size, file_uploads, or post_max_size values don't change in phpinfo();


cat /etc/php.ini.default | grep -E -i -w 'file_uploads|upload_max_filesize|post_max_size'

post_max_size = 8M

file_uploads = On

upload_max_filesize = 2M


cat /etc/php.ini | grep -E -i -w 'file_uploads|upload_max_filesize|post_max_size'

post_max_size = 8M

file_uploads = On

upload_max_filesize = 5M



phpinfo:


file_uploadsOnOn



post_max_size8M8M



upload_max_filesize2M2M


Even if I turn off file_uploads, then restart apache the value doesn't change.


Any other ideas?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to change upload_max_filesize and post_max_size

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.