Re: WWW-Authenticate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Cummings wrote:

On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote:
Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted it exactly? It won't recognise the user name or password. Does Authenticate work on all servers? Here is my phpinfo if that helps?!
http://www.royalarchmasonsofquebec.com/phpinfo.php
I don't get it.
John

<?php
if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))
    || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'password' ) ) {

   header('WWW-Authenticate: Basic realm="Private"');
   header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.' . '<a href="' . $PHP_SELF . '">Try again</a> or contact <a href="mailtoGSE@xxxxxxx">GSE</a>';
   exit;

} else {
?>
in
<?php
}
?>

Check phpinfo() and let us know the value of "register_globals".

register_globals 	On 	On

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux