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

Modify php.ini to block program error messages_PHP Tutorial

WBOY
WBOYOriginal
2016-07-22 09:02:41874browse

 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...
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