Whenever I have an error in my php code, MAMP just returns a 500 error. Is there anyway I can get MAMP to tell me what went wrong like parsing errors and stuff?
3 Answers
Just as you reported, you must have display_errors
set to on
. This can be done either by changing the conf file or by using .htaccess like so:
<IfModule mod_php5.c>
php_flag display_errors on
</IfModule>
Additionally, you can do this with ini_set()
like so:
ini_set('display_errors', 1);
One last thing, you can also check /Applications/MAMP/logs
which has three different error log files.
Try opening terminal and run this command:
tail -f /Applications/MAMP/logs/php_error.log
When you want to stop "following" (the -f
switch) the log file, just type control+C.

- 9,514
- 5
- 50
- 69
You can also access MAMP errors using the Mac "Console" app to read the php_error.log
file.
I find this easiest to access by using spotlight and typing in "error.log".
( it won't find it if you type "php_error.log", you must type "error.log" )
It looks like this :
2022 update:
If we talk about usual MAMP (not PRO version), my research showed that there's no way to enable displaying of PHP errors using GUI. However, all the old approaches with configuration files mentioned in answers to this question and several others still work. But be careful with config names since they have been changing over some versions.
For MAMP PRO users: You can easily enable outputting of PHP errors using GUI:
- Switch to
Expert view
at the top left corner: screenshot - Click on the PHP language: screenshot
- And then check the option
to screen
of theLog errors
property: screenshot - Hit
Save
and restart the servers when MAMP asks you to restart or not.
You're done. PHP now should output error message in the place where error occured.
Also, if you prefer configuring everything by hand, the option with configuration files works here as well.
At the time of writing this answer, the actual version of MAMP (and PRO) was 6.6.2.