When programming with PHP Apache, under the default settings, PHP coding errors will not be prompted, which is very inconvenient for development. You can use the following steps to open the error message:
1. Open the php.ini file.
Take my ubuntu as an example, this file is in the /etc/php5/apache2 directory.
2. Search and modify the following line, change the Off value to On
display_errors = Off
3. Search for the following line
error_reporting = E_ALL & ~E_NOTICE
or search:
error_reporting = E_ALL & ~E_DEPRECATED
Modify to
error_reporting = E_ALL | E_STRICT
4. Modify Apache’s httpd.conf,
Take my Ubuntu as an example, this file is in :/etc/apache2/ directory, this is a blank file.
Add the following two lines:
php_flag display_errors on
php_value error_reporting 2039
5. Restart Apache and it will be OK.
Restart command: :sudo /etc/init.d/apache2 restart
I hope the above website can be helpful to you