Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem if there is no php message in php phpinfo?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to solve if there is no php information in php phpinfo". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "php phpinfo does not appear php information how to solve" it!

Php phpinfo can not appear php information solutions: 1, find and open the php.ini file; 2, open the short_open_tags; 3, reload the php.ini service.

This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer

What if the php message cannot appear in php phpinfo? Why can't your phpinfo () display

I. description of the problem

A php file, test.php, is written with the following code:

The browser visited but returned NULL.

II. Problem orientation and solution

After looking it up on the Internet, the problem encountered by most people is actually the problem of short_open_tags. Their code is as follows:

In this case, you need to open the short_open_tags in the php.ini, and then reload the php.ini service to OK.

There are two more questions. One is how to know which php.ini file php is loading. You can execute it under the command line: php-- ini to find the php.ini file. The second is how to reload the php.ini file, how to enable php-fpm on your server, generally restart php-fpm on the OK, the command is: service php-fmp restart, if you do not enable the php-fpm service (earlier version of php), generally restart the apache service on OK, the command is service httpd restart.

After following the above steps, the problem encountered by most people will be solved, but this is someone else's problem, not the same as mine, orz....

Unfortunately, I felt that this thing must have something to do with the configuration of php, so I went to the official website to take a look at the document of php.ini. The latter configuration is as follows:

Disable_functions string this directive allows you to disable certain functions for security reasons. Accepts a comma-separated list of function names as arguments. Disable_functions is not affected by security mode. This directive can only be set in php.ini. For example, you cannot set it to httpd.conf.

It means that some methods can be configured in php.ini, but these methods cannot be called. Open php.ini to find this configuration, and sure enough, the method phpinfo () is disabled, as follows:

Disable_functions = phpinfo,system,proc_open,proc_close,show_source,popen,pclose at this point, I believe you have a deeper understanding of "php phpinfo does not appear php information how to solve", might as well come to the actual operation! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report