Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php.ini resetting on MAMP server restart

Tags:

php

mamp

I am trying to change display_errors = Off to display_errors = On in my php.ini. I ran phpinfo() and verified the Loaded Configuration File (it is located here: /Library/Application Support/appsolute/MAMP PRO/conf/php.ini).

Everytime I edit the display_errors value of this php.ini file and restart my MAMP server, the php.ini file seems to reset. If I open the php.ini file again after restarting MAMP it shows display_errors = Off.

Why might MAMP be resetting the php.ini file?

note - I'm using MAMP Pro if that makes a difference.

like image 563
themarkappleby Avatar asked Nov 03 '12 20:11

themarkappleby


People also ask

Do I need to restart after changing PHP INI?

PHP-FPM you need to restart to avoid configuration inconsistency. Some workers will lay dormant and keep the old configuration, while new workers will get the new configuration.

Where is PHP ini file in Mamp?

If you are using MAMP Standard (the Free version) then you need to open either /Applications/MAMP/bin/php/php5. 2.17/conf/php. ini or /Applications/MAMP/bin/php/php5.


1 Answers

The way I have done it was to change the template that MAMP Pro replaces your php.ini file with. In my case the ini file that PHP was loading was found at

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

but everytime I changed it, MAMP Pro wrote over it with its own version. To change what I wanted to change in the php.ini file, I simply found the template:

/Applications/MAMP PRO/MAMP PRO.app/Contents/Resources/php5.4.4.ini 

(PHP 5.4.4 is the version i'm using) and then I changed what I needed to change :D Hope this helps

like image 71
Dan Jackson Avatar answered Sep 17 '22 09:09

Dan Jackson