Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers can't login!!!


fogoextremo

Recommended Posts

Hi!

I tried to search this forum for almost a week, for the answer for my problem, but nothing...

Since I moved to a new host, my customers can't login. There's no errors, it just go back to first page, as guest! Also if I try to add something to the cart, it shows up a page with "no products in list!".

What is happenning??? Does someone knows where is the problem?? Is this something to do with cookies?

The rest is all working, including the admin.

Thanks for all

 

Alexandre

Link to comment
Share on other sites

I'm having quite the same problem .. customers cannot login .. wrong e-mail address or incorrect password. And when I try to send password to my e-mail address .. it gladly notes that new address is already sent .. but nothing gets through. What to do?

 

If I send e-mail to customer using Admin console everything is OK!

Link to comment
Share on other sites

Hi!

I tried to search this forum for almost a week, for the answer for my problem, but nothing...

Since I moved to a new host, my customers can't login. There's no errors, it just go back to first page, as guest! Also if I try to add something to the cart, it shows up a page with "no products in list!".

What is happenning??? Does someone knows where is the problem?? Is this something to do with cookies?

The rest is all working, including the admin.

Thanks for all

 

Alexandre

 

Because your configuration files aren't setup correctly (and maybe the osc admin session settings) Start from catalog\includes\configure.php

Link to comment
Share on other sites

Humm, let's see, here's my /catalog/includes/configure.php file:

define('HTTP_SERVER', 'http://apollo.soldigit.net/~ppfhfnjg'); // 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', 'apollo.soldigit.net/~ppfhfnjg');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/');

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', 'pub/');

define('DIR_FS_CATALOG', '/home2/ppfhfnjg/public_html/');

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

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

 

and here is my /catalog/admin/includes/configure.php file:

 

define('HTTP_SERVER', 'http://apollo.soldigit.net/~ppfhfnjg'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://apollo.soldigit.net/~ppfhfnjg');

define('HTTPS_CATALOG_SERVER', '');

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

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

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

define('DIR_FS_ADMIN', '/home2/ppfhfnjg/public_html/admin/'); // absolute pate required

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

define('DIR_FS_CATALOG', '/home2/ppfhfnjg/public_html/'); // 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/');

 

Is there something wrong???

Link to comment
Share on other sites

can you put this line in the configure.php at the end? You should have already one so just replace it to store sessions in the mysql database.

 

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

Yes I already have...

 

// define our database connection

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

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

well the other extreme case is to have somehow set the sessions timeout to 0 or something. I see in your site the sessions change on every click.

 

what's the php and mysql versions you're using?

Link to comment
Share on other sites

PHP Version. 4.4.1 (Zend: 1.3.0)

Data Base: MySQL 4.1.14-standard

 

I cannot see how to change the timeout sessions... I searched in admin - Settinhs - Sessions , but I only found to set the directory to store the files (it's in /tmp). By the way, I didn't have this directory on my space, but I created one tmp in root (/), but problem persists...

 

I'm loosing my hope...

Link to comment
Share on other sites

backup files, goto your catalog\includes\functions\sessions.php near the beginning of the file find this code

 

	if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
  $SESS_LIFE = 1440;

}

 

change it to this

 

$SESS_LIFE = 1440;

 

Also post the sessions settings you have on the admin end.

Link to comment
Share on other sites

I changed the file as you said, but nothing...

The /catalog/admin/includes/sessions.php file:

<?php

/*

$Id: sessions.php,v 1.9 2003/06/23 01:20:05 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if (STORE_SESSIONS == 'mysql') {

if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {

$SESS_LIFE = 1440;

}

 

function _sess_open($save_path, $session_name) {

return true;

}

 

function _sess_close() {

return true;

}

 

function _sess_read($key) {

$qid = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'");

 

$value = tep_db_fetch_array($qid);

if ($value['value']) {

return $value['value'];

}

 

return false;

}

 

function _sess_write($key, $val) {

global $SESS_LIFE;

 

$expiry = time() + $SESS_LIFE;

$value = $val;

 

$qid = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");

$total = tep_db_fetch_array($qid);

 

if ($total['total'] > 0) {

return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'");

} else {

return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')");

}

}

 

function _sess_destroy($key) {

return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");

}

 

function _sess_gc($maxlifetime) {

tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'");

 

return true;

}

 

session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');

}

 

function tep_session_start() {

return session_start();

}

 

function tep_session_register($variable) {

return session_register($variable);

}

 

function tep_session_is_registered($variable) {

return session_is_registered($variable);

}

 

function tep_session_unregister($variable) {

return session_unregister($variable);

}

 

function tep_session_id($sessid = '') {

if ($sessid != '') {

return session_id($sessid);

} else {

return session_id();

}

}

 

function tep_session_name($name = '') {

if ($name != '') {

return session_name($name);

} else {

return session_name();

}

}

 

function tep_session_close() {

if (function_exists('session_close')) {

return session_close();

}

}

 

function tep_session_destroy() {

return session_destroy();

}

 

function tep_session_save_path($path = '') {

if ($path != '') {

return session_save_path($path);

} else {

return session_save_path();

}

}

?>

Link to comment
Share on other sites

Except for the first (Session directory, that is set to /tmp), everithing is set to false.

Sessions

 

Session Directory /tmp

Force Cookie Use False

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions False

Recreate Session False

Link to comment
Share on other sites

set the prevent spider sessions to true

 

set the sessions directory to

 

/home2/ppfhfnjg/public_html/tmp

 

and make sure the directory is present.

 

I do not see anything else with the configure.php

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...