PHP prompts Warning:phpinfo() has been disabled. Solution to function disabling, warningphpinfo_PHP tutorial

WBOY
Release: 2016-07-13 10:11:28
Original
1003 people have browsed it

PHP prompts Warning:phpinfo() has been disabled. Solution to function disabling, warningphpinfo

The example in this article describes the solution to the PHP prompt Warning:phpinfo() has been disabled function. Share it with everyone for your reference. The specific analysis is as follows:

Today when I was testing a website on a friend’s server, I found that I encountered the PHP Warning: phpinfo() has been disabled for security reasons when testing phpinfo. According to the meaning of the words, I summarized the solution. Let’s take a look at it together. Let’s see.

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

The meaning of this paragraph is to tell us that the phpinfo() function is disabled due to security considerations. If you have server management rights, please modify the php.ini configuration file parameters and restart apache to re-enable it.

Open the php installation path and open the php.ini file. Specific example: There is a disable_functions configuration in php.ini. In the default configuration, cli execution functions are prohibited. If necessary, you need to change disable_functions in php.ini. = phpinfo, exec, popen, system ...., delete the function you need to execute from the list and restart apache.

It is entirely a configuration problem. The solution in Linux is to edit the PHP configuration file:

vi /usr/local/php/etc/php.ini

Look for the disable_functions string and delete the scandir behind it. Tip: You can enter / under vi to enter the search mode and easily find disable_functions.

Restart PHP to take effect:

Copy the code The code is as follows:
/etc/init.d/php-fpm restart

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/929095.htmlTechArticlePHP prompts Warning: phpinfo() has been disabled The solution to function disabling, warningphpinfo This article describes the example of PHP prompting Warning Solution to :phpinfo() has been disabled function disabling. ...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template