Published on: February 1, 2017 by Manu M.
Today I am going to show you a basic but important tweak. PHP is one of the famous programming languages out there and most of the websites run on them. Most of the times we forget about basic and small things that need to be looked up and one such aspect is hiding the version information of PHP you are using or your site runs on.
It is not good to expose your PHP information to the public. You can hide the PHP version information HTTP Headers from public by editing you php.ini
How to hide it?
Open the php.ini and search for the following line
expose_php = on
Change it to
expose_php = off
That’s it, now no one will be able to view which PHP version you are using.
If you don’t know the location of your php.ini run following command
php -i |grep php.ini
So that’s it from me today. Hope this post is also helpful to you 🙂
Category : Howtos, Linux