Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant get authorization working in winnt 4.0 + apache 1.3.20 + php 4.0

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to make an authorization using PHP... from php.net I make such example:
<?php
if(!isset($PHP_AUTH_USER)) {
Header(&quot; BASIC realm=\&quot;My Realm\&quot;, stale=false&quot;);
Header(&quot;HTTP/1.0 401 Unauthorized&quot;);
echo &quot;Text to send if user hits Cancel button\n&quot;;
exit;
} else {
echo &quot;Hello $PHP_AUTH_USER.<P>&quot;;
echo &quot;You entered $PHP_AUTH_PW as your password.<P>&quot;;
}
?>
But, I only get error message:
[Wed Aug 01 15:16:32 2001] [error] [client 217.22.164.179] malformed header from script. Bad header=HTTP/1.0 401: d:/program files/apache group/apache/php/php.exe
please help :(
 
Hello,

Sad to say, but forceful authentication ( method) is not available in the CGI version of PHP. If you can, try to switch to the module version (ISAPI?) which should be more than possible on you NT box (a lot of documentation is available).

Once you get php setup and running as a module, style user authentication will work just fine for you.

Chad. ICQ: 54380631
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top