I recently changed to a MacBook and now use the MAMP-stack for development locally.
In my earlier development environment I always could see informative error-reports when I tried to access a PHP file through a web-browser and an error occurred. With the default installation of MAMP it seems that this feature is disabled, whenever I hit an error I can't see the cause of it, I can't even see a single line informing me that an error occurred.
Not until I start to debug the code in a debugger I can see where the error occurred.
Any idea how error reporting can be turned on?
I tried:
error_reporting(E_ALL);
No effect at all though.
reporting level to
E_ALL
and display errorson
Include the following code at the top of every php file on in aninclude
orrequire
such as yourconfig.php
Try
ini_set('display_errors', 'on');
You'll also want to check a
phpinfo()
, to see if the ini_sets are doing anything.Navigate to MAMP settings (eg
localhost:8889/MAMP
)Click
PHP
TabFind
Log errors:
settingTick
to screen
Click
Save
Or change
"display_errors = Off"
to"display_errors = On"
in /Applications/MAMP/bin/php/php5.4.4/conf/php.ini