[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [RAQ4] PHP_AUTH_USER
- Subject: Re: [cobalt-users] [RAQ4] PHP_AUTH_USER
- From: Jake Smith <jake@xxxxxxxxxx>
- Date: Fri Sep 29 07:23:01 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Are you putting the auth code before anything else in the file? IE:
Yes , this is just a test file so all I am trying to do is get the window
to come up and ask for a username and password.
<?php
// --- begin file auth.php ---
if(!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm=\"My Realm\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel button\n";
exit;
} else {
echo "<p>Hello $PHP_AUTH_USER.</p>";
echo "<p>You entered $PHP_AUTH_PW as your password.</p>";
}
?>
<!-- rest of doc, if any for some reason, goes below this line -->
<!-- end file auth.php -->
Then calling the file via http://www.yourdomain.com/auth.php ?
I was doing it as a ip http://255.255.255.255/test.php
I will try on a site with a domain pointing to it and see if that works
I dunno. I haven't seen a Raq4, but I'd assume it's compiled as a module.
Check httpd.conf for the LoadModule/AddModule lines relating to php.
Its is loaded as a module,
thanks for your help, I really appreciate it
jake smith