By default, the php syntax error prompt is not displayed in ubuntu. To enable the syntax, you need to modify the following:
1. Open the php. Ini file.
This file is in the/etc/php5/apache2 Directory. You must modify the permission of this file to write the file.
Sudochmod777/etc/php5/apache2/php. ini
2. Search and modify the downstream, and change the Off value to On
Display_errors = Off
3. Search downstream
Error_reporting = E_ALL &~ E_NOTICE
Or search:
Error_reporting = E_ALL &~ E_DEPRECATED
Change
Error_reporting = E_ALL | E_STRICT
4. Modify httpd. conf of Apache,
This file is located in the/etc/apache2/Directory. This is a blank file and the file also needs to be modified.
Sudochmod777/etc/apache2/httpd. conf
Add the following two lines:
Php_flagdisplay_errorson
Php_valueerror_reporting2039
5. Restart Apache and you will be OK.
Restart command:
Sudo/etc/init. d/apache2restart
OK! The error message is successfully enabled! The above is how to enable the PHP error prompt of LAMP in Ubuntu.
Summary:The error prompt method for enabling php in Ubuntu is not much different from other Linux suites. If you are using another Linux version, it is also applicable.