: This article mainly introduces the php error prompt for enabling lamp in ubuntu. if you are interested in the PHP Tutorial, please refer to it. Error prompt for enabling lamp php in ubuntu
The default lamp mode in ubuntu does not have a php syntax error prompt. to enable it, 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.
- sudo chmod 777 /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.
- sudo chmod 777 /etc/apache2/ httpd.conf
-
Add the following two lines:
- php_flag display_errors on
-
- php_value error_reporting 2039
-
5. restart Apache and you will be OK.
Restart command:
- sudo /etc/init.d/apache2 restart
-
OK! The error message is successfully enabled! The above is how to enable the PHP error prompt of LAMP in Ubuntu.
The above introduces the php error prompt for enabling lamp in ubuntu, including some content, and hope to be helpful to friends who are interested in PHP tutorials.