[PHP-DEV] PHP 4.0 Bug #3884: PHP4 CGI sends wrong headers with my SSL server From: ajung <email protected>
Date: 03/20/00

From: ajung <email protected>
Operating system: Solaris 2.7
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Scripting Engine problem
Bug description: PHP4 CGI sends wrong headers with my SSL server

I tried to use the example script from the documentation
for basic authen. with my CGI version of PHP4 under Apache 1.3.12/SSL:

<?
    header("WWW-Authenticate: Basic realm=\"My Realm\"");
    header("HTTP/1.0 401 Unauthorized");
    header("pragma: no-cache");
    echo "Text to send if user hits Cancel button\n";
    exit();
?>

Always the Apache server responses with a 500 internal
server error. Excerpt from the script log:

%% [Tue Mar 21 05:41:21 2000] GET /cgi-bin/php4/kunden/index.php3 HTTP/1.0
%% 500 /home/secprint/www/apache/cgi-bin/php4
%request
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Charset: iso-8859-1,*,utf-8
Accept-Encoding: gzip
Accept-Language: de
Connection: Keep-Alive
Host: milliways:8443
Pragma: no-cache
User-Agent: Mozilla/4.7 [de] (Win98; U)
%response
HTTP/1.0 401 Unauthorized
%stdout
X-Powered-By: PHP/4.0b4pl1
WWW-Authenticate: Basic realm="My Realm"
pragma: no-cache
Content-Type: text/html

Text to send if user hits Cancel button

Excerpt from the error_log:
[Tue Mar 21 05:41:21 2000] [error] [client 212.88.192.10] malformed header from
script. Bad header=HTTP/1.0 401 Unauthorized: /home/secprint/www/apache/cgi-bin/
php4

I have no idea where the problem is......any idea ?!

Andreas Jung

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>