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 set php not to display version information

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today, I will talk to you about how to set php not to display version information, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Php settings do not display version information: 1, find the php.ini file; 2, change the default "expose_php = On" to "expose_php = Off"; 3, restart apache.

This article operating environment: Windows7 system, PHP5.6 version, DELL G3 computer

PHP Hidden version number tutorial

PHP itself does not enable listening services, so to prevent scanners from judging vulnerabilities by version numbers, we need to hide the version number at the http header, not the version number at the command line of the system.

1. View the current php version number

Visit any page in a current service and intercept response packets

two。 Locate the php.ini file

Locate php.ini

3. View the profile currently used by PHP [optional]

It should be said that the configuration file used by PHP is generally / etc/php.ini, but it is not necessarily so it can be further confirmed.

Php-I | grep php.ini

Access to the classic phpinfo.php page is probably the most authoritative

4. Hide the version number and restart apache (if you use other http servers, restart them in their own way)

Edit the configuration file found and change the default expose_php = On to expose_php = Off

Service httpd restart

5. Cut the packet again and check that there is no X-Powered-By header.

What is the framework of php? php framework: 1. Laravel,Laravel is a free and open source PHP application framework. 2. Phalcon,Phalcon is the fastest PHP framework. 3. Symfony,Symfony is a PHP framework for Web projects. 4. Yii,Yii is a fast, secure and professional PHP framework. CodeIgniter,CodeIgniter is a very agile open source PHP framework. 6. CakePHP,CakePHP is an old PHP framework. 7. Kohana recorder Kohana is an agile but powerful PHP framework.

After reading the above, do you have any further understanding of how php is set not to display version information? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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