Rebooting php.ini when restarting the MAMP server

I am trying to change display_errors = Off to display_errors = On in my php.ini. I ran phpinfo () and checked the downloaded configuration file (it is here: / Library / Application Support / appsolute / MAMP PRO / conf / php.ini).

Every time 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 will display display_errors = Off .

Why can MAMP reload the php.ini file?

note - I use MAMP Pro if that matters.

+8
php mamp
source share
3 answers

I did this to change the template that MAMP Pro replaces your php.ini file. In my case, the ini file downloaded by PHP was found in

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

but every time 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 just found a 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

+23
source share

I finally figured it out. MAMP Pro works differently than regular MAMP. Using regular MAMP, you must edit the corresponding php.ini file directly. Together with MAMP Pro, you should use the MAMP Pro interface to manage php.ini settings. MAMP Pro updates the php.ini file every time the server starts based on these settings.

In my case, to display server errors, I had to open the MAMP Pro interface. Go to the Server tab. Go to the PHP tab. Check the Display startup errors box. Check the All errors and warnings . Check the Display box. Apply the changes and restart the server.

+1
source share

You can set php.ini values ​​using the template editor in Mamp Pro.

File -> Modify Template -> PHP (php.ini)

Select the version in which your instance is running.

When you save the template, Mamp will overwrite the php.ini file used for your instance and restart Apache.

Edit PHP INI with TAMPPLATE MAMP Editor

0
source share

All Articles