SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member mickboon's Avatar
    Join Date
    Aug 2001
    Location
    Ontario
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php_auth_user starting problem.

    Background info:
    I have windows 98 SE, Apache 1.3.20 and PHP 4.0.6 installed as a module. The page is NOT in a folder with a .htaccess file.


    I just can't seem to get the php_auth_user to work.
    I've had the prompt box pop up and entered the user name and password but it doesn't accept anything.
    Here's the script:

    PHP Code:
    <?php
    if(!isset($PHP_AUTH_USER)) {
      
    Header("WWW-Authenticate: Basic realm=\"My Realm\"");
      echo 
    "Text to send if user hits Cancel button\n";
      exit;
    } else {
      echo 
    "Hello $PHP_AUTH_USER.<P>";
      echo 
    "You entered $PHP_AUTH_PW as your password.<P>";
    }
    ?>
    It seems as though the prompt is not saving the stuff i typed in the $PHP_AUTH_USER and for the password. I've successfully used a .htaccess file but i just can't seem to even get the PHP auth. started.

    I've tried many tutorials but with no success. I'm not sure if it's a server config that needs to be changed or what.

    *sigh* - deeply frustrated.
    Last edited by mickboon; Aug 29, 2001 at 14:18.
    I'm a special case. Any new problem, or unsolveable problem is first tested out on me. I'm a social guinea pig.
    Therefore i'd rather be living the high-life in a tin can.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What error are you getting? Or is it just not displaying the username and password you put in?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Member mickboon's Avatar
    Join Date
    Aug 2001
    Location
    Ontario
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    What error are you getting? Or is it just not displaying the username and password you put in?
    it reprompts me for a username and password as if i entered it wrong.
    With Netscape it just continues to prompt me for another user and password. With IE, it does it 3 times then gives the authentication error saying i entered it wrong.
    I'm a special case. Any new problem, or unsolveable problem is first tested out on me. I'm a social guinea pig.
    Therefore i'd rather be living the high-life in a tin can.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •