Edit report at http://bugs.php.net/bug.php?id=23902&edit=1
ID: 23902 Comment by: taverna_ambelos at windowslive dot com Reported by: noxter at web dot de Summary: header("HTTP/1.0 401 Authorization Required"); failed Status: Closed Type: Bug Package: CGI related Operating System: Windows 2000 PHP Version: 4.3.2 Assigned To: edink New Comment: i forget my adress for ip Previous Comments: ------------------------------------------------------------------------ [2010-04-20 08:49:08] dim_logaras at windowslive dot com i forgot my username for ip addres ------------------------------------------------------------------------ [2003-06-05 04:05:14] jan at kneschke dot de Doesn't IIS parse CGI headers ? If it does: CGI-script are not allowed to send HTTP-response headers at all. If a CGI script wants to pass a status-code to the Server by stetting the Status-header. http://cgi-spec.golux.com/draft-coar-cgi-v11-03-clean.html Section 7.2 removing the HTTP-response header is a good thing for Parser-Header environments. ------------------------------------------------------------------------ [2003-06-04 18:17:10] ptchristendom at yahoo dot com On windows 2003, PHP 4.3.2, any location header at all causes this. You can also verify it from the command line: script.php contains this line only: <? header('Location: http://localhost.com/page.html'); ?> Output: d:\php-4.3.2\php script.php (null) Content-type: text/html; charset=iso-8859-1 X-Powered-By: PHP/4.3.2 Location: http://localhost.com/page.html Setting cgi.rfc2616_headers = 0 is a workaround for this, at least until the bug is fixed. ------------------------------------------------------------------------ [2003-06-03 05:15:38] ed...@php.net I have applied Shane's patch which solves the problem with (Null) in the header output. cgi.rfc2616_headers should be left to 0 if basic authentication is used under IIS and PHP cgi as Shane noted. In order to make it work you would need to edit in your IIS configuration 'Directory Security'. Click on 'Edit' and check only 'Anonymous access'. All other fields should be left empty. http://snaps.php.net/win32/php4-win32-STABLE-latest.zip will contain the fix in some 3 hours or so. ------------------------------------------------------------------------ [2003-06-03 03:11:18] ed...@php.net cgi.rfc2616_headers directive was added in response to bug #19207. Later changes to SAPI.c made it malfunction. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=23902 -- Edit this bug report at http://bugs.php.net/bug.php?id=23902&edit=1