How to hide or delete PHP version information

Hiding PHP's version information is a security measure. It makes it difficult for would-be attackers to get access to the server's environmental information. The way to fix it is simple, by simply modifying a configuration option. Do this by fixing the value of a variable in the php configuration file php.ini.

Modify the configuration to the following, and then restart php.
php.ini


# Author: www.botread.com

; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
;expose_php = On
expose_php = Off

 

Leave a Reply

Your email address will not be published. Required fields are marked *