Re: Re: Why PHP always reports X-Power?

From: Date: Fri, 30 Jun 2000 07:39:17 +0000
Subject: Re: Re: Why PHP always reports X-Power?
Groups: php.general 
Request: Send a blank email to php-general+get-3974@lists.php.net to get a copy of this message
On 30 Jun, To: wyuanzheng@21cn.com wrote: > On 30 Jun, Edward Wong wrote: >> Hi, Teodor: >> >> Thanks for response. I set "expose_php" off in php.ini, and "X-Power" >> disappears, >> but still left "Content-type: text/html "; In another words, it reports >> "X-Power by PHP4, Content-type: text/html " but now it reports "Content-type: >> text/html ", >> >> How to get rid of this message too? >> >> Thanks. >> > > If you are getting that message in your browser, you probably have an > error somewhere that is causing your headers to be send as content. This > was covered earlier today - have a quick look in the archive. > Never mind - here it is, courtesy of Zeev: In fact, it always emits the X-Powered-By line. Normally, however, this line becomes a part of the HTTP header and is transparent to the end user. You end up seeing it in your browser only if something goes wrong during the startup phase of PHP, usually due to a parse error of the php.ini file, or an invalid or missing extension referenced from it. This results in emitting an error message, which the Web server identifies as the HTTP header; The X-Powered-By line that follows is then considered as a part of the document body, which is why you end up seeing it in your browser. This problem occurs only under Windows, since Windows considers stderr output (through which the error message is reported) no different from stdout output. PHP 4.0.1 solves this problem by presenting a Windows message-box that describes the error, which you can hardly miss. Once you notice what the error is and fix it (again, most probably by fixing php.ini) - the problem will be gone. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#3974) next »