Jump to content

Recommended Posts

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);

 

The above did not work when trying to login again. 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();
}
}

 

Any help would be appreciated, thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/244675-admin-login-issue-need-help-please/
Share on other sites

The only way a general php programming help forum could help with what the code is doing, would be if you posted the code in the file that is generating the "Incorrect username or password" error message so that someone could see the logic that is being used in order to pin down the possible reasons.

 

This is actually a php programming issue with a 3rd party script, so moving to the correct forum section...

Thanks for replying. Here is the code within the index.php file. Any help appreciated.

 

<?php

define('ADMIN', TRUE);

include '../includes/bootstrap.php';

$template->render('admin/header');
$template->render('admin/index');
$template->render('admin/footer');

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.