PHP4 & AUTH procedure
| From: | Francisco Puentes | Date: | Sat, 24 Mar 2001 16:08:14 +0000 |
| Subject: | PHP4 & AUTH procedure | ||
| Groups: | php.lang | ||
| Request: | Send a blank email to php-lang+get-128@lists.php.net to get a copy of this message | ||
I am migratting to PHP4 from PHP3, and i want to try a basic auth scheme PHP
file example like this:
<%
if(!isset($PHP_AUTH_USER))
{
Header("WWW-authenticate: Basic realm=\"Acceso restringido\"");
Header("HTTP/1.1 401 Unauthorized");
echo "To access you need a pair (name,password), SORRY!!";
exit;
}
else
{
echo "ALL OK";
exit;
}
%>
But that example don't work. In fact, explorer reintent auth dialog 3 times
ever, and fail. (isset($PHP_AUTH_USER) return false ever)
Problem can be from Explorer (5.50), Apache (1.3.14-3) or PHP (4).
(( PHP module was rebuild from sources to support Interbase access, so it
would be a error of me!! ))
Can anybody help me?