PHP 4.0 Bug #2759: Apache send "Content-Type" before PHP (cgi-version) can send it's own headers.
| From: | joel dot jacobson at mobigym dot se | Date: | Thu, 18 Nov 1999 19:07:07 +0000 |
| Subject: | PHP 4.0 Bug #2759: Apache send "Content-Type" before PHP (cgi-version) can send it's own headers. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12738@lists.php.net to get a copy of this message | ||
From: joel.jacobson@mobigym.se
Operating system: GNU/Linux v2.2.13
PHP version: 4.0 Beta 3
PHP Bug Type: Scripting Engine problem
Bug description: Apache send "Content-Type" before PHP (cgi-version) can send it's
own headers.
I have installed the cgi-bin version of PHP4 on my system.
I'm using Apache-SSL 1.3.9 with SuEXEC enabled.
php-scripts that contains HTTP-headers, like this one, won't work because Apache sends
"Content-Type: text/html" before PHP can send it's HTTP-headers. For an example, this
script doesn't work on my system:
<?php
if (!$PHP_AUTH_USER) {
header("HTTP/1.1 401 Access Denied");
header("WWW-Authenticate: Basic realm='Admin Login'");
header("Connection: close");
exit;
}
?>
I don't know if there is a way to solve this problem, is it?
It's probably not a bug, but maybe the PHP developers could write something about this in the
FAQs.
Thanks for any comments.
Best regards, Joel Jacobson