faqts : Computers : Programming : Languages : PHP : Installation and Setup : PHP4

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

49 of 71 people (69%) answered Yes
Recently 5 of 10 people (50%) answered Yes


X-Powered-By: PHP/4.0RC1 Content-type: text/html

Dec 10th, 2002 12:50
Dan Anderson, George Alvarez, Phil Greenway, dan bob, Bob Barker, Matthias Redl, Daniel Brandt, Zend PHP discussion group

It didn't work completely for me.  The "X-Powered ..." is indeed 
removed by commenting out the expose_php line, or turning it off.
However, the "Content-type:  still shows up.  The loadable extensions 
doesn't seem to make a difference.
The only way I got rid of this was to set error_reporting = 1 , ie, 
errors only.  Any value above this, (warnings, I guess) brings this 
notice and displays in HTML.  Alternatively, I suppose, you could set 
the display_error OFF.
I have tried this solution - however it doesn't work with PHP4 / Apache 
1.3.12 / NT4 / IE5.
If my entry in PHP.INI is default_mimetype = ""
I still get on the web page "Content-type:"
But if I comment the line like ;default_mimetype = ""
I get on the web page "Content-type: text/html"
So if anyone has any ideas ? 
This is actually 2 parts:
X-Powered-By: PHP/4.0RC1
Server: . . . PHP/4.0RC1
are removed by commenting out the 'expose php' 
line in the php.ini file.
To eliminate the Content-type: text/html comment out ALL the loadable 
extensions in the php.ini file.
Hope this helps.
Commenting out the loadable extensions solves the problem in both 
parts. With the 'expose_php = On' in php.ini,
"X-Powered-By: PHP/4.0RC1"
is still sent as header information, but not printed on your pages.