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.
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.
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.
Restart the apache by stopping and starting the server in MAMP. Now, you can see the errors on your web page.