Home > Backend Development > PHP Tutorial > Modify php.ini to block program error messages_PHP Tutorial

Modify php.ini to block program error messages_PHP Tutorial

WBOY
Release: 2016-07-22 09:02:41
Original
887 people have browsed it

 Provide you with some information:

 display_errors = On

By default, php turns on error message display, we changed it to:

 display_errors = Off

 After turning off the error display, the PHP function execution error information will no longer be displayed to the user. This can prevent attackers from knowing the physical location of the script and some other useful information from the error message to a certain extent, at least to the attacker. Black box detection creates certain obstacles. These error messages may be useful to ourselves. We can let it be written to the specified file, then modify it as follows:

 log_errors = Off

Change to:

 log_errors = On

 And the specified file, find the following line:

 ;error_log = filename

 Remove the previous; comment and change the filename to the specified file, such as /usr/local/apache/logs/php_error.log

 error_log = /usr/local/apache/logs/php_error.log

 In this way, all errors will be written to the php_error.log file.

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/371890.htmlTechArticle Provide you with some information: display_errors = On By default, php turns on the error message display. We change it to: display_errors = Off. After turning off the error display, the php function executes the error message...
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