SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Admin Login problems

    Im experiencing problems with logging in to admin panel, even im entering the correct username/password.

    I have this config.php file with the following code;

    $admin_password = "admin";
    $admin_username = "admin";

    And in the admin panel php file the following code;

    PHP Code:
    <?php

    include_once("utils.php");
    @
    session_start();
    if(
    $_SESSION[aname] == 4){


    /*if (!isset($_SERVER['PHP_AUTH_USER']))
    {
      header("WWW-Authenticate: Basic realm=\"Cool Stuff\"");
      header('HTTP/1.0 401 Unauthorized');
      echo 'Access Denied';
      exit;
    }
    else
    {
      if (($_SERVER['PHP_AUTH_PW']!=$admin_password) || ($_SERVER['PHP_AUTH_USER']!=$admin_username))
      {
        header('HTTP/1.0 401 Unauthorized');
        echo "<h1>Access Denied</h1>";
        exit;


    Are there any errors to find here? Or is it some issues from the server side?
    Last edited by SpacePhoenix; Aug 18, 2013 at 16:15. Reason: placed php tags around php code


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
  •