Server Administration & Management

How to hide PHP version

Find your php.ini file

# vi /usr/local/lib/php.ini

and look for the line that says “expose_php On“ Change it to “expose_php Off“

Restart your HTTP service

# /etc/init.d/httpd restart

Done! No more PHP version number in your HTTP response header

April 19, 2011 Posted by | PHP, Security | , , | 3 Comments