Php: modify php. ini to block program exceptions.

Source: Internet
Author: User
Php: modify php. ini to provide you with some information about the error information of the shielding program: display_errors = On & nbsp; by default, the error message is displayed in php. we will change it to: & nbsp php: modify php. ini to obtain the error message of the blocked Program
Provide you with a bit of information: display_errors = On php by default, the error message is displayed. we will change it:
Display_errors = Off After the error display is disabled, the php function execution error information will not be displayed to the user. This will prevent attackers from learning the physical location of the script from the error information to a certain extent, as well as some other useful information, at least it may cause some obstacles to the attacker's black box detection. These error messages may be useful to us and can be written to a specified file. modify the following:
Log_errors = Off to: log_errors = On And the specified file. find the following line: ; Error_log = filename Remove the comment and change 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.

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.