Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin Login Loop


Guest

Recommended Posts

Posted

I am having a problem with logging into admin....

 

the login screen appears.

I type in my information (which I KNOW is correct).

Hit enter and it looks as though it will log you in, but it returns to the same login page.

 

I've searched around for a fix and the advice that keeps showing up is to check the following setting in admin/confg:

 

define('STORE_SESSIONS', 'mysql');

 

I have it set as above and it has not resolved the problem.

 

Any suggestions?

Posted
I am having a problem with logging into admin....

 

the login screen appears.

I type in my information (which I KNOW is correct).

Hit enter and it looks as though it will log you in, but it returns to the same login page.

 

I've searched around for a fix and the advice that keeps showing up is to check the following setting in admin/confg:

 

define('STORE_SESSIONS', 'mysql');

 

I have it set as above and it has not resolved the problem.

 

Any suggestions?

What does your configure file look like?

Posted
What does your configure file look like?

 

<?php
 define('HTTP_SERVER', 'http://xxx.com');
 define('HTTP_CATALOG_SERVER', 'http://xxx.com');
 define('HTTPS_CATALOG_SERVER', 'https://xxx.com');
 define('ENABLE_SSL_CATALOG', true);
 define('DIR_FS_DOCUMENT_ROOT', '/usr/home/tfs/public_html/xxx/');
 define('DIR_WS_ADMIN', '/xxx/admin/');
 define('DIR_FS_ADMIN', '/usr/home/tfs/public_html/xxx/admin/');
 define('DIR_WS_CATALOG', '/xxx/');
 define('DIR_FS_CATALOG', '/usr/home/tfs/public_html/xxx/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_HTTP_CATALOG', '/xxx/admin/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'xxx_osc1');
 define('DB_SERVER_PASSWORD', 'xxxxxxxx');
 define('DB_DATABASE', 'xxx_osc1');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

Posted

For the fun of it, after backing up the file, try commenting out the following code in admin/includes/application_top.php and see if you can log in:

 

// redirect to login page if administrator is not yet logged in

if (!tep_session_is_registered('admin')) {

$redirect = false;

 

$current_page = basename($PHP_SELF);

 

if ($current_page != FILENAME_LOGIN) {

if (!tep_session_is_registered('redirect_origin')) {

tep_session_register('redirect_origin');

 

$redirect_origin = array('page' => $current_page,

'get' => $HTTP_GET_VARS);

}

 

$redirect = true;

}

 

if ($redirect == true) {

tep_redirect(tep_href_link(FILENAME_LOGIN));

}

 

unset($redirect);

Posted
For the fun of it, after backing up the file, try commenting out the following code in admin/includes/application_top.php and see if you can log in:

 

// redirect to login page if administrator is not yet logged in

if (!tep_session_is_registered('admin')) {

$redirect = false;

 

$current_page = basename($PHP_SELF);

 

if ($current_page != FILENAME_LOGIN) {

if (!tep_session_is_registered('redirect_origin')) {

tep_session_register('redirect_origin');

 

$redirect_origin = array('page' => $current_page,

'get' => $HTTP_GET_VARS);

}

 

$redirect = true;

}

 

if ($redirect == true) {

tep_redirect(tep_href_link(FILENAME_LOGIN));

}

 

unset($redirect);

 

Same deal. Stuck in that login loop :(

Posted
Same deal. Stuck in that login loop :(

 

 

Still having this problem :(

 

What files would be handling the admin login? I am thinking that I should take the files from a fresh osc and try to work that way. I'm just not sure which files are responsible for the login besides app top and html output.

Posted

Is there anyone that has any ideas on this problem?

Posted
Is there anyone that has any ideas on this problem?

You could try using your control panel to access the database and look at the administrators table to verify the user name. Maybe try resetting the password (do a Google search and you should find threads on how to do that).

  • 6 months later...
Posted

I believe I am having a similar problem. When I try to go to www.mysite.com/estore/admin I get this returned by Google Chrome:

 

This webpage has a redirect loop.

 

The webpage at http://www.mysite.com/estore/admin/login.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

 

I am including my /admin/configure.php file and the other configure.php file in that order.

 

define('HTTP_SERVER', 'http://www.mysite.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.mysite.com');

define('HTTPS_CATALOG_SERVER', '');

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('HTTPS_ADMIN_SERVER', '');

define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/estore/');

define('HTTPS_COOKIE_PATH', '');

define('ENABLE_SSL', 'false'); // secure webserver for checkout procedure?

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_WS_HTTP_ADMIN', '/estore/admin/');

define('DIR_WS_HTTPS_ADMIN', '');

define('DIR_FS_DOCUMENT_ROOT', '/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/estore/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/estore/admin/'); // absolute path required

define('DIR_WS_CATALOG', '/estore/'); // absolute path required

define('DIR_FS_CATALOG', '/estore/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// Added for Templating

define('DIR_FS_CATALOG_MAINPAGE_MODULES', DIR_FS_CATALOG_MODULES . 'mainpage_modules/');

define('DIR_WS_TEMPLATES', DIR_WS_CATALOG . 'templates/');

define('DIR_FS_TEMPLATES', DIR_FS_CATALOG . 'templates/');

 

 

Configure.php

 

define('HTTP_SERVER', 'http://www.mysite.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/estore/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/estore/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

//Added for BTS1.0

define('DIR_WS_TEMPLATES', 'templates/');

define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/');

define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/');

//End BTS1.0

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', 'estore/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  • 1 year later...
Posted

I know this is a bit late reply (more than 1 year old topic) BUT I also know that people who have this problem visit this topic (like me), so this is what helped me:

 

Create a php-file in /catalog/admin, for example 'fix.php' and make the file contain this code:

<?php
$HTTP_GET_VARS =& $_GET;
$HTTP_POST_VARS =& $_POST;
$HTTP_ENV_VARS =& $_ENV;
$HTTP_SERVER_VARS =& $_SERVER;
$HTTP_COOKIE_VARS =& $_COOKIE;
$_REQUEST = array_merge($_GET, $_POST, $_COOKIE);
?>

 

At the top of the /catalog/admin/includes/application_top.php (right after the <?php) paste this code:

require('fix.php');

 

Try it, it was my solution when moving a webshop to another server. (I had to do this in the catalog, too). It's no guarantee, the problem can also have other causes.

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...