Enabling PHP Error Reporting in MAMP

Published on October 12, 2015 by

While developing PHP applications with MAMP on OS X, it is very useful to be able to see errors being printed directly in the browser. By default, this is disabled with MAMP, but it is very easy to enable error reporting in MAMP. All you have to do is to follow the simple steps below.

  1. Navigate to /Applications/MAMP/conf/php{your-version} and open php.ini. If you are unsure which PHP version you are using, then open the preferences within MAMP and check the PHP tab.
  2. Search for display_errors and change the value from Off to On. Just above this, you can also configure which errors you want to be displayed by configuring error_reporting, but it is recommended leaving this to E_ALL for development environments.
  3. Restart your Apache web server by stopping and starting your servers in MAMP.

If you are using MAMP Pro, you should enable this in the user interface by checking the “To: Display” option within the error handling configuration. See more about that here.

You will now see errors printed on the screen if you run a PHP script that triggers errors, warnings or notices.

Author avatar
Bo Andersen

About the Author

I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!

11 comments on »Enabling PHP Error Reporting in MAMP«

  1. Vadim

    Now it works! Thank you very much!

  2. Andrew

    File locations have has changed since this was written. For step 1 go to \MAMP\conf\php{version} to find php.ini .

    Also in \MAMP\bin\php\php{version} you may find two files named php.ini-development and php.ini-production that you can use to overwrite the above php.ini. The development one has error reporting enabled together with more useful configuration.

  3. Thanks a lot for the heads up, Andrew! I have updated the path within the post. Thanks again! :-)

  4. Ptmp727

    In MAMP 5.2 I just downloaded it, it is not displaying errors. Line 472

  5. Paul Brown

    Feb 2019:

    For me, Only editing the file @ /Applications/MAMP/bin/php/php7.2.10/conf/php.ini worked

    Obviously my PHP version is 7.2.10 (change this to whatever is reported in your phpinfo file.

    Thanks Paul

  6. Jo Kinng

    And where is this on Mamp for windows?

  7. Philip

    Thanks a lot, Andrew!
    I was really wondering, why my changes in the php.ini did not help.
    It was overwritten by MAMP\bin\php\php{version}
    I had really been looking for this. Thank you!

  8. Abdellah Ramadan

    Thank you very much for this. It works.

  9. Merlin

    Thank you!
    I am learning to code and to see error messages helps a lot for debugging…

  10. Berk Erday

    Thanks a lot Paul your way is work on me too and also thanks for Bo too he did made that beautiful solusion started and Paul made the finish!
    Guys you can use this way too if the first one dont work. /Applications/MAMP/bin/php/php7.4.2/conf/php.ini
    best regards Berk.

  11. krishna

    This one worked for me.Thank you!

Leave a Reply

Your e-mail address will not be published.