PHP hints Warning:phpinfo () has been disabled function disabled workaround _php Tips

Source: Internet
Author: User
Tags phpinfo phpinfo php

The example in this article describes a workaround for PHP prompts Warning:phpinfo () has been disabled function disabled. Share to everyone for your reference. The specific analysis is as follows:

Today, a friend of the server test a Web site found that I encountered in the test phpinfo PHP warning:phpinfo () has been disabled for the security reasons prompted, by the words of meaning I summed up the solution, Let's take a look at the next.

When you run phpinfo you are prompted as follows:PHP Warning:phpinfo () has been disabled for security reasons in xx.php on line XX

This passage means to tell us that due to security considerations the Phpinfo () function is disabled, and if you have server administrative privileges, please modify the php.ini profile parameter and restart Apache again.

Open the PHP installation path to open the php.ini file, specific example: in php.ini exist disable_functions configuration, the default configuration, CLI execution function is prohibited, if necessary, in PHP.ini will Disable_ functions = Phpinfo,exec, Popen, system ..., delete the function you need to perform from the list and restart Apache.

Completely a problem with configuration, Linux solution for the edit PHP configuration file:

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

Look for the Disable_functions string, the following scandir delete, hint: VI can be entered/, enter the search mode, easy to find disable_functions.

Reboot PHP in effect:

Copy Code code as follows:
/ETC/INIT.D/PHP-FPM restart

I hope this article will help you with your PHP program design.

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.