PHP coding error does not display error message prompt solution_PHP tutorial

WBOY
Release: 2016-07-13 17:41:05
Original
1236 people have browsed it

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486167.htmlTechArticleUsing PHP Apache programming, under the default settings, PHP coding errors will not be prompted, which is very important for development I mean, it's very inconvenient. You can use the following steps to open the error message: 1. Open...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!