Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 7 of 7

Thread: Php Error

  1. #1
    Platinum Lifetime Member

    Join Date
    Aug 2004
    Location
    Belgium
    Posts
    143
    DNF$
    297
    Bank
    0
    Total DNF$
    297
    Donate  

    Php Error

    global $ADMIN_PWD;
    if ( $member == 1 )
    {
    if ( $_SERVER['PHP_AUTH_USER'] == 'admin' && $_SERVER['PHP_AUTH_PW'] == $ADMIN_PWD )
    {
    return true;
    }

    if ( $error_handle )
    {
    header( "WWW-Authenticate: Basic realm=\"Directory Administration\"" );
    header( "HTTP/1.0 401 Unauthorized" );
    echo "Access denied";
    exit;
    }
    }

    return false;

    There is a mistake somewhere but, I can not see it. Someone else?

    Regrads,
    Chris
    www.yemoo.net - Free web directory

  2. #2
    www.LOL.biz
    Bender's Avatar
    Join Date
    Apr 2004
    Location
    .ro
    Posts
    1,912
    DNF$
    6,243
    Bank
    0
    Total DNF$
    6,243
    Donate  

    Re: Php Error

    is this a function?

  3. #3
    Platinum Lifetime Member

    Join Date
    Aug 2004
    Location
    Belgium
    Posts
    143
    DNF$
    297
    Bank
    0
    Total DNF$
    297
    Donate  

    Re: Php Error

    yes, it's a function it web team.
    www.yemoo.net - Free web directory

  4. #4
    David Ausman
    DavidAusman's Avatar
    Join Date
    May 2005
    Location
    127.0.0.1
    Posts
    853
    DNF$
    1,494
    Bank
    0
    Total DNF$
    1,494
    Donate  

    Re: Php Error

    why is the $_SERVER['PHP_AUTH_USER'] set to admin if the $member is true, will this be the problem?

  5. #5
    www.LOL.biz
    Bender's Avatar
    Join Date
    Apr 2004
    Location
    .ro
    Posts
    1,912
    DNF$
    6,243
    Bank
    0
    Total DNF$
    6,243
    Donate  

    Re: Php Error

    ok, can you post the whole function then?

  6. #6
    Platinum Lifetime Member

    Join Date
    Jun 2005
    Location
    good old germany
    Posts
    42
    DNF$
    9,680
    Bank
    0
    Total DNF$
    9,680
    Donate  

    Re: Php Error

    PHP Code:
    <?php
    global $ADMIN_PWD;
    if ( 
    $member == )
    {
    if (isset(
    $_SERVER["PHP_AUTH_USER"]) &&
    $_SERVER["PHP_AUTH_USER"] == "admin" &&
    $_SERVER["PHP_AUTH_PW"] ==$ADMIN_PWD) {
     return 
    true;

    } else {
    header("WWW-Authenticate: Basic realm=\"Directory Administration\"");
    header("HTTP/1.0 401 Unauthorized");
    }}
    ?>
    try this one

    regards tog

  7. #7
    Platinum Lifetime Member

    Join Date
    Aug 2004
    Location
    Belgium
    Posts
    143
    DNF$
    297
    Bank
    0
    Total DNF$
    297
    Donate  

    Re: Php Error

    thanks problem solved.
    www.yemoo.net - Free web directory

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
  •  

Domain name forum recommended by Domaining.com