Home > Article > Backend Development > How to enable php error prompts under mac
How to open mac php errors: First open the "php.ini" file; then modify the content to "display_errors = On"; then select the Log errors option of mamp pro; and finally select "to_screen".
Recommended: "PHP Tutorial"
Enable php error reminder in mamp environment under MAC
1. The first step is to modify the php.ini file: open the /Applications/MAMP/bin/php/{your PHP version}/conf/php.ini file
Find display_errors = Off ( About line 277), change display_errors = On and find error_reporting = E_ALL (about line 270, there are 3 value types, set according to your own needs)
2. Set the Log errors option of mamp pro in two steps:
Main Window->php->Log errors and select to_screen , so that errors will be prompted on the browser
After setting is completed, restart the service.
The above is the detailed content of How to enable php error prompts under mac. For more information, please follow other related articles on the PHP Chinese website!