Re: Why PHP always reports X-Power?
| From: | Zeev Suraski | Date: | Thu, 29 Jun 2000 13:54:56 +0000 |
| Subject: | Re: Why PHP always reports X-Power? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3800@lists.php.net to get a copy of this message | ||
On Thu, 29 Jun 2000, Sebastian Bergmann wrote:
> Teodor Cimpoesu wrote:
> > > X-Powered-By: PHP/4.0.0 Content-type: text/html
> > > On every PHP Page!!!!
> > edit php.ini and disable it (expose_php off or something)
>
> This maybe won't do it for him.
>
> Assuming from the fact that he used MS OLE to post his message he's
> using PHP on Win32.
>
> Whenever PHP fails with loading an extension on Win32 the "X-Powered
> ..." message is printed. (Why? Doesn't make sense to me.)
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.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/