repost : http authentication problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jorntk@yahoo.com

    repost : http authentication problem

    if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AU TH_PW))) {

    header( 'WWW-Authenticate: Basic realm="Private" ' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;

    } else {

    echo "You entered $PHP_AUTH_USER for a username.<BR>";
    echo "You entered $PHP_AUTH_PW for a password.<BR>";

    }

    why does the above keep on asking me for username and password

    my global_variable setting is ON, i am using php 4.3.1 with apache 2
    server on xp pro.

    please help
  • R. Rajesh Jeba Anbiah

    #2
    Re: repost : http authentication problem

    jorntk@yahoo.co m (jorntk@yahoo.c om) wrote in message news:<e9da850b. 0308171735.5196 2e26@posting.go ogle.com>...[color=blue]
    > if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AU TH_PW))) {[/color]

    Using lik $PHP_AUTH_USER is old style. Instead use $_SERVER['PHP_AUTH_USER']

    Don't forget to visit http://in.php.net/features.http-auth

    ---
    Email: rrjanbiah-at-Y!com

    Comment

    • Pertti Kosunen

      #3
      Re: repost : http authentication problem

      <jorntk@yahoo.c om> wrote in message
      news:e9da850b.0 308180802.1f869 6d0@posting.goo gle.com...[color=blue]
      > i try to change the apache server to run php as module, i follow to
      > step in the install.txt file but the apache server cannot be started.
      > can anyone tell me what is the correct step to run php 4.3.1 as apache
      > 2 module?
      > thanks in advance.[/color]




      Comment

      Working...