Home  >  Article  >  Backend Development  >  Open error messages for PHP and Apache

Open error messages for PHP and Apache

WBOY
WBOYOriginal
2016-07-30 13:31:071165browse
If you use PHP + Apache, under the default settings, PHP encoding errors will not be prompted, which is very inconvenient for development. You can use the following steps to open the error message (cetnos is used as an example here):
1. Open the php.ini file.
This file is in: /etc/php.ini .
2. Search and modify the following line,

display_errors = Off

Change the Off value to On

3. Search for the following line
error_reporting = E_ALL & ~E_ DEPRECATED & ~E_STRICT
Modify to
error_reporting = E_ALL | E_STRICT

4. Modify Apache’s httpd.conf,

Add the following two lines in /etc/httpd/conf/httpd.conf


php_flag display_errors on
php_value error_reporting 2039
5. Restart Apache and it will be OK.

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the error prompts when opening PHP and Apache, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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