Open PHP debug mode under Ubuntu Error information solution
In Ubuntu, the default setting for PHP is not to display the error message, and if the program error will show "Unable to handle this request error prompt", this is very inconvenient in the development environment.
Actually, we just need to edit the Apache configuration file.
1, my Apache configuration file directory is/etc/apache2/apache2.conf
sudo vim/etc/apache2/apache2.conf
Add the following two lines to the end
Php_flag display_errors on
php_value error_reporting 2039
2, restart Apache
sudo service apache2 restart
This completes the display of the error message.
Note: If you are not able to change the configuration under php.ini (I do not change it can be displayed, because the code added above has been opened)
sudo vim/etc/php/7.0/cli/php.ini
Search display_errors default is display_errors=off change to Display_errors=on save quit reboot Apache2 can
Thank you for reading, I hope to help you, thank you for your support for this site!