Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

When a customer tries to sign in problems


geek303

Recommended Posts

Posted

When a customer tries to sign in , it brings them back to the sign in page instead of signing them in.

 

Plwease help me figure out why this is happening.

Matt Ray

Posted

Using osCommerce 2.2-MS2

 

 

 

Here's the login.php file

<?php

/*

$Id: login.php,v 1.2 2003/09/24 13:57:08 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

if ($HTTP_GET_VARS['origin'] == FILENAME_CHECKOUT_PAYMENT) {

define('NAVBAR_TITLE', 'Order');

define('HEADING_TITLE', 'Ordering online is easy.');

define('TEXT_STEP_BY_STEP', 'We'll walk you through the process, step by step.');

} else {

define('NAVBAR_TITLE', 'Login');

define('HEADING_TITLE', 'Welcome, Please Sign In');

define('TEXT_STEP_BY_STEP', ''); // should be empty

}

 

define('HEADING_RETURNING_ADMIN', 'Login Panel:');

define('HEADING_PASSWORD_FORGOTTEN', 'Password Forgotten:');

define('TEXT_RETURNING_ADMIN', 'Staff only!');

define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:');

define('ENTRY_PASSWORD', 'Password:');

define('ENTRY_FIRSTNAME', 'First Name:');

define('IMAGE_BUTTON_LOGIN', 'Submit');

 

define('TEXT_PASSWORD_FORGOTTEN', 'Password forgotten?');

 

define('TEXT_LOGIN_ERROR', '<font color="#ff0000"><b>ERROR:</b></font> Wrong username or password!');

define('TEXT_FORGOTTEN_ERROR', '<font color="#ff0000"><b>ERROR:</b></font> first name and password not match!');

define('TEXT_FORGOTTEN_FAIL', 'You have try over 3 times. For security reason, please contact your Web Administrator to get new password.<br> <br> ');

define('TEXT_FORGOTTEN_SUCCESS', 'The new password have sent to your email address. Please check your email and click back to login.<br> <br> ');

 

define('ADMIN_EMAIL_SUBJECT', 'New Password');

define('ADMIN_EMAIL_TEXT', 'Hi %s,' . "nn" . 'You can access the admin panel with the following password. Once you access the admin, please change your password!' . "nn" . 'Website : %s' . "n" . 'Username: %s' . "n" . 'Password: %s' . "nn" . 'Thanks!' . "n" . '%s' . "nn" . 'This is an automated response, please do not reply!');

?>

Posted

Wrong login.php file... that's the eng lang file.

it sounds like a cookie problem... might even be in you IE settings... is everyone who signs up being sent to the login page or just you?

 

i would look at the cookie settings in you admin.. but i wish i had a straight forward anwser for you..

<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Posted

Some customers don't have a problem, but I have got numerous email from customers who sign on then look at a product and it asks them to sign in again and keeps repeating itself by sending them to the signin page.

 

Thanx in advance.

Matt

 

 

 

Here's the login.php---hopefully the right one.......

 

 

<?php

/*

$Id: login.php,v 1.2 2003/09/24 14:33:16 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 

$error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

 

// Check if email exists

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

if (!tep_db_num_rows($check_customer_query)) {

$error = true;

} else {

$check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good

if (!tep_validate_password($password, $check_customer['customers_password'])) {

$error = true;

} else {

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

 

$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");

$check_country = tep_db_fetch_array($check_country_query);

 

$customer_id = $check_customer['customers_id'];

$customer_default_address_id = $check_customer['customers_default_address_id'];

$customer_first_name = $check_customer['customers_firstname'];

$customer_country_id = $check_country['entry_country_id'];

$customer_zone_id = $check_country['entry_zone_id'];

tep_session_register('customer_id');

tep_session_register('customer_default_address_id');

tep_session_register('customer_first_name');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

 

// restore cart contents

$cart->restore_contents();

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

 

if ($error == true) {

$messageStack->add('login', TEXT_LOGIN_ERROR);

}

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));

 

$content = CONTENT_LOGIN;

$javascript = $content . '.js';

 

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

  • 2 weeks later...
Posted

Could be a problem with a patch they installed on their computers for IE 6.0. The patch reference number that causes the problem is: KB832894.

 

You can get a fix for the patch here from Microsoft:

 

http://support.microsoft.com/default.aspx?kbid=831167

 

If you tell your customers to go to Microsoft to get the patch be sure to give them the link. The fix does not come up when doing a Windows update as the fix has not yet been made available through a general security update event.

Regards,

John

 

"There is nothing like a little successful tinkering to bring out the looney mad scientist in all of us. Brohoohoohoooohaahaahaaahahaaaaaaaaaa!"

  • 2 weeks later...
Posted

I am having the same problem and have not found a solution in any forum yet. I have tried changing my settings in the admin section, I also downloaded and installed the patch from Microsoft. Still no luck. I am not using AOL either. Other than this everything seems to work great.. but that is no good if no one can login to the site.

  • 2 weeks later...
Posted

This problem appeared to me this morning:

 

I tried the modification proposed in this post, but on the file catalog/includes/classes/sessions.php instead of the admin one. Now it works, but it was also working during one month wihout this modification...

 

There can be also a problem with IE6, look here, but in my case the problem was with 3 different brosers.

 

Hope it helps

Posted

Okay, let's sort things out here. If this is the problem that I think it is, the problem you're having is a common one. The customer tries to Login, or to Sign Up for an account, or tries to proceed to checkout - and they end up back at the Login page again. It has nothing to do with the login.php file. It has everything to do with your includes.configure.php file! This what what it should look like. There may be variations, according to your hosting companies setup, whether you use a shared ssl, or a full sll. This is set up for a shared sll, installed in the root directory e.g. yourdomain.com/index.php

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.yourdomain.com/'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://servername.yourhost.com/yourdomain.com/'); //  eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com/');
 define('HTTPS_COOKIE_DOMAIN', 'https://servername.yourhost.com/yourdomain.com/');
 define('HTTP_COOKIE_PATH', ''); 
 define('HTTPS_COOKIE_PATH', ''); 
 define('DIR_WS_HTTP_CATALOG', '/var/www/html/'); // absolute path required (only catalog if not installed in root directory)
 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/');

 define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
 define('DIR_FS_DOCUMENT_ROOT', '/var/www/html/'); (you can delete this line)
 define('DIR_FS_CATALOG', '/var/www/html/'); 
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers (if it doesn't work try 127.0.0.1)
 define('DB_SERVER_USERNAME', 'your mysql username');
 define('DB_SERVER_PASSWORD', 'yourmysql password');
 define('DB_DATABASE', 'yourdomain_com_-_oscommerce');(default install name for database)
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'(set to mysql)
?>

Hope this helps - Vger :D

Archived

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

×
×
  • Create New...