How to shield phpinfo () functions in php

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff. When we configure the php environment, we usually write phpinfo (). This function is used to test whether the php environment is successfully installed, but this function often brings security risks to the system. How can we turn this function off? The following describes how to modify the php. ini file.

Welcome to the Linux community forum and interact with 2 million technical staff> when we enter the php environment, we usually write phpinfo (). This function is used to test whether the php environment is successfully installed, but this function often brings security risks to the system. How can we turn this function off? The following describes how to modify the php. ini file.

Welcome to the Linux community forum and interact with 2 million technicians>

We usually write phpinfo () When configuring the php environment. This function is used to test whether the php environment is successfully installed. However, this function also brings security risks to the system, so how can we turn off this function? The following describes a method:

Modify the php. ini file and find the following lines in it,

Disable_functions =; This directive allows you to disable certain

; Functions for security reasons. It has es

; A comma separated list of function names.

; This directive is * NOT * affected by whether

; Safe Mode is turned on or off.

Write it

Disble_functions = phpinfo

Restart apache to block the phpinfo () function.

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.