Thread: http auth

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    29
    Rep Power
    0
    win98/apache1.3.9/php4 rc1

    http_authentication doesn't work on my local machine. It keeps on giving me a 500 error and says it can't be displayed with the following code:

    if(!isset($PHP_AUTH_USER)) {
    Header("WWW-Authenticate: Basic realm="test"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "cancel this!n";
    exit;
    } else {
    echo "Hello $PHP_AUTH_USER.<P>";
    echo "You entered $PHP_AUTH_PW as your password.<P>";
    }

    Is there something i need to turn on in my .conf files? I copied this code from php.net to make sure.

    any help would be greately appreciated =)

    Cisk
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    PHP has to be compiled as an Apache module for http authentication to work. IIRC, PHP can not be compiled as an Apache module until RC2 under Win32.

    [This message has been edited by rod k (edited May 12, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    29
    Rep Power
    0
    i upgraded to rc2 and am not running php as cgi and it still does not work. It just keeps on giving me a 500 error?

    Cisk

IMN logo majestic logo threadwatch logo seochat tools logo