www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjarne Ingelsson <bja...@sourcetech.se>
Subject general/7869: malformed header from script
Date Thu, 14 Jun 2001 13:17:58 GMT

>Number:         7869
>Category:       general
>Synopsis:       malformed header from script
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jun 14 06:20:00 PDT 2001
>Originator:     bjarne@sourcetech.se
>Release:        1.3.20
Win2K Pro SP2
Apache 1.3.20
PHP 4.0.4 pl1
I get "Internal Server Error" and the error-log states:
"malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: c:/drivers/php/php.exe"
when running a PHP script which requests HTTP Authentication.

I was running 1.3.19 when I encountered the problem, and an upgrade to 1.3.20 did not solve
my problem.
I copied the file (a very small test-script, see below) to a Linux machine where it worked
like a dream. (I get the message box promping me for a user/password)
In the Linux (RH 6.2) machine I'm running 1.3.12 / PHP4.0.4pl1.

PHP Code snip:
  $COMPANY_NAME = "SourceTech AB";
  header("WWW-Authenticate: Basic realm=\"The Realm of $COMPANY_NAME\"");
  header("HTTP/1.0 401 Unauthorized");
  echo "<H3>Error bla bla try again</H3>\n";
 else // A password is entered...
  // We dont get this far



 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message