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

[cobalt-users] [RAQ4] PHP_AUTH_USER



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>";
}
?>

jake smith