Error message about enabling lamp php on ubuntu

Source: Internet
Author: User
Tags php syntax error
When you enable lamp in ubuntu, the following error occurs: the default lamp mode in ubuntu does not have a php syntax error message. if you want to enable lamp, you need to modify the following: 1. open the php. ini file. This file is in the/etc/php5/apache2 Directory. you need to modify the php error prompt for enabling lamp 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 in:/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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.