tags:

views:

159

answers:

1

I know that header_remove doesn't work in php versions < 5.3 and I use 5.2.1. I am looking for an alternative to header_remove to remove the X-Powered-By header.

I tried using header("X-Powered-By: "); but it still generates a blank header. I tried using Header unset X-Powered-By in .htaccess, but for some reason it's not working. I am stuck here.

+2  A: 

AFAIK, there is no replacement for this function, but you can either alter the result to something bogus as described above, or configure php.ini to block this header with the following statement:

expose_php = Off
Lourenzo Ferreira
I don't have access to php.ini as I am on a shared hosting on Apache.
Castor