PHP prompts Warning: Solution for disabling the phpinfo () hasbeendisabled Function

Source: Internet
Author: User
This article mainly introduces the solution for disabling the PHP prompt Warning: phpinfo () hasbeendisabled function. It involves the modification technique for disabling the function in the configuration file and is of practical value. If you need it, you can refer

This article mainly introduces the solution for disabling the PHP prompt Warning: phpinfo () has been disabled function. It involves the modification techniques for disabling functions in the configuration file and is very useful, if you need a friend

This article describes how to disable the has been disabled function in bs/php/2014040278544.html "> PHPbs/javascript/2013110861152.html"> prompt Warning: phpinfo. Share it with you for your reference. The specific analysis is as follows:

When I tested a website on a friend's server today, I found that I encountered a prompt in PHP Warning: phpinfo () has been disabled for security reasons when testing phpinfo, I have summarized the solution. Let's take a look at it.

When running phpinfo, the following prompt is displayed: PHP Warning: phpinfo () has been disabled for security reasons in XX. php on line XX.

This section tells us that the phpinfo () function is disabled due to security considerations. If you have the Server Management permission, modify the parameters of the php. ini configuration file and restart apache to re-enable it.

Open the php installation path and open php. INI file, specific instance: in php. in ini, The disable_functions configuration exists. in the default configuration, the cli execution function is disabled. If necessary, you must go to php. in ini, disable_functions = phpinfo, exec, popen, system ...., Delete the function you want to execute from the list and restart apache.

It is completely a configuration problem. In linux, the solution is to edit the PHP configuration file:

Vi/usr/local/php/etc/php. ini

Search for the disable_functions string and delete the scandir that follows it. The prompt is: Enter/in the Search Mode Under vi to easily find disable_functions.

Restart PHP to take effect:

The Code is as follows:

/Etc/init. d/php-fpm restart

I hope this article will help you with php programming.

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.