Admin Login Issue - Need Help Please

Discussion in 'PHP' started by kiwigurlnz, Aug 12, 2011.

  1. #1
    I brought a script expecting it to be a smooth install, but I've come across error after error grrr. Can someone please help me with this problem...

    Now, usually a script u purchase comes with an install read file. Well I'm stuck at a step where it says to create a user via mydomain.com/admin. There is no "Create User" link in the menu, instead it has a login/password. So I type in the current login/password given in the install read file and it doesn't seem to login "Incorrect username or password" I've double checked via the MyPhpAdmin and the record does show that the password is what is given in the install read file. Anyway I emailed the person I brought the script from and he seems to think its a "database issue" so he gave me this:


    
    Edit /includes/bootstrap.php
    
    Change this:
    
    // Enable this for error showing.
    // error_reporting(E_ALL);
    
    To this:
    
    // Enable this for error showing.
    error_reporting(E_ALL);
    
    Code (markup):

    That did not work, here is the code within the bootstrap.php file:

    
    <?php
    
    // Enable this for error showing.
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    
    if(defined('ADMIN'))
    {
    	$application_path = rtrim(realpath('../'), '/').'/';
    }
    else
    {
    	// ensure there's a trailing slash
    	$application_path = rtrim(realpath('./'), '/').'/';	
    }
    
    // Is the system path correct?
    if ( ! is_dir($application_path))
    {
    	exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
    }
    
    define('BASEPATH', str_replace("\\", "/", $application_path));
    
    // Start the initialization of core classes.
    require_once BASEPATH.'/classes/input.php';
    require_once BASEPATH.'/classes/config.php';
    require_once BASEPATH.'/classes/database.php';
    require_once BASEPATH.'/classes/template.php';
    require_once BASEPATH.'/classes/pagination.php';
    
    require_once BASEPATH.'/includes/functions.php';
    
    if(defined('ADMIN'))
    {
    	require_once BASEPATH.'/classes/authentication.php';
    	
    	$path = parse_url(base_url(), PHP_URL_PATH);
    
    	if($_SESSION['logged'] !== TRUE && $_SERVER['REQUEST_URI'] != $path.'admin/auth.php?page=login')
    	{
    		header('Location: '.site_url('admin/auth').'?page=login');
    		exit();
    	}
    }
    
    Code (markup):
    Any help appreciated thanks.
     
    kiwigurlnz, Aug 12, 2011 IP
  2. vineld

    vineld Greenhorn

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    What you did above is simply display error messages (depending on your server settings that may not work though).
     
    vineld, Aug 13, 2011 IP
  3. kiwigurlnz

    kiwigurlnz Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    It didn't work and that's why I posted this thread so hopefully someone can help with this...
     
    kiwigurlnz, Aug 13, 2011 IP