PHP prompts Warning: Solution for disabling the phpinfo () hasbeendisabled function, warningphpinfo. PHP prompts Warning: how to disable the phpinfo () hasbeendisabled function. This article describes how to disable the PHP prompt Warning: phpinfo () hasbeendisabled. PHP prompts Warning: Solution for disabling the phpinfo () has been disabled function, warningphpinfo
The example in this article describes how to disable the PHP prompt "Warning: phpinfo () has been disabled. 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.
How to disable the Destroy () has been disabled function. warningphpinfo this article describes how to disable the PHP prompt Warning: phpinfo () has been disabled function ....