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

Re: [cobalt-users] [RAQ4] PHP_AUTH_USER



----- Original Message -----
From: "Jake Smith" <jake@xxxxxxxxxx>


> I am trying to use PHP_AUTH_USER and PHP_AUTH_PW,
>
> I try running a simple test script and all I get is errors,  I am trying
to
> figure out what I need to change in either php.ini or apache.conf to get
> this to work.  Thanks for any help,
>
> <?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>";
> }
> ?>

What kind of errors?  What's printed to the error log?  Need a bit more
information.

I'm assuming you do know that PHP has to be loaded as an Apache module for
PHP_AUTH to work correctly.

--
Brian Curtis