Hide php version information

Tags: expose_phpphpphp.iniversion

Published on: February 1, 2017 by Manu M.

Hide php version information


Hello folks,

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 🙂

Get 24/7 expert server management

Category : Howtos, Linux

Manu M.

Manu M.

Manu has been with us for past one and half years and is a person with good technical skills and domain knowledge. Being a highly athletic personality, Manu likes to play Cricket and Badminton of all games whenever he gets time off. Apart from his technical and athletic abilities, he is a good writer and has tried his hands on penning a few poems of his own. He believes in the mantra that "small things matter the most" and this nature can also visible in his blogs and writings.

You may also read:


Add new commentSIGN IN

Let's Connect


Your Cart

Cart is empty.

Send this to a friend