How to enable the php error in MAMP

By default, Error display on screen is disabled in the MAMP. For this reason, we aren’t able to see any useful errors on the web page. To solve this problem, we can easily display the php errors by just following these steps.

Step 1:

First, we need to identify which php version are we using. To do that go the MAMP, and click on the Preferences. After that click on the php section and that will display php version.

Step 2:

So, we found out which php version are we using to develop the application. Now, move to the applications / MAMP/ bin / php / php[version] i.e. php 7.1.x.x. / config > php.ini. Now, search for two thing and they are error_reporting, and display_errors. Change display_errors = Off to On and leave error_reporting to E_ALL as default. E_ALL will report all error. So, we don’t need to change any thing on that part.

Step 3:

Restart the apache by stopping and starting the server in MAMP. Now, you can see the errors on your web page.

One thought on “How to enable the php error in MAMP

  1. The real problem here is why did the mamp team include every minor php release in a product aimed at entry level developers? It is not very professional.

Leave a Reply

Your email address will not be published. Required fields are marked *