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/bin/php/php{your-version}/conf 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!

One comment on »Enabling PHP Error Reporting in MAMP«

  1. Vadim

    Now it works! Thank you very much!

Leave a Reply

Your e-mail address will not be published.