Zen Cart Logo
Forums / Managing Customers and Orders / Customers unable to login OR create new account

Customers unable to login OR create new account

Locked

Views: 8,906

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
28 Sep 2006, 5:04 AM
#1
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Customers unable to login OR create new account

I understand that this is an issue that's been around for awhile. I have tried the plethora of suggested fixes, including (but not limited to):

  • Setting "recreate sessions" to false (and vice versa)
  • Setting "force cookie use" to false (and vice versa)
  • Setting every other Admin > Configuration > Sessions setting to true & false
    {insert 'pulling my hair out' emoticon}

When you go to the following page, you are unable to log in with an existing account, nor can you create a new account without being given the "invalid user/pass combo" error:

https://www.smackmyshirtup.com/store/index.php?main_page=login

The error message will probably say "WTF?! Wrong email or password. Try again!".

I know you guys are brilliant and can help me with this one. And I hope that by virtue of my just saying that, it somehow speeds up the process. :smile: I'm about to lose it, whatever "IT" is.

28 Sep 2006, 6:12 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customers unable to login OR create new account

Useful information would include things like:

  • version of Zen Cart
  • version of PHP
  • who is your host
  • version of apache/IIS
  • list of all mods/addons/contributions installed
  • etc
28 Sep 2006, 6:42 AM
#3
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Customers unable to login OR create new account

Sorry about that! You get so wrapped up in the problem you forget the information that might actually help.

Zen Cart 1.3.0.1
PHP Version 5.1.2
Hosted by DreamHost on server "lucky"
Apache/2.0.54 (Unix)
No contributions added, Pretty heavily modified template with focus on the product pages, including some javascript functions on product pages.

I've tried to login from IE, FireFox and Opera.

Thanks, and sorry for my initial exclusions.

28 Sep 2006, 8:08 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customers unable to login OR create new account

empirenine:

  • Setting "recreate sessions" to false (and vice versa)
  • Setting "force cookie use" to false (and vice versa)
  • Setting every other Admin > Configuration > Sessions setting to true & false

Try this:

  1. Please put all those settings back to the defaults, except leave "recreate session" to "false" (since Dreamhost requires that).```
    Cookie Domain True
    Force Cookie Use False
    Check SSL Session ID False
    Check User Agent False
    Check IP Address False
    Prevent Spider Sessions True
    Recreate Session **** False for Dreamhost ****
    IP to Host Conversion Status true

2. Replace your /includes/functions/sessions.php with the contents below. This is a modified/retrofitted version of fixes added since v1.3.0.1
(this is a good time to remind you that 2 bugfix releases have been issued since v1.3.0.1)
<?php /** * functions/sessions.php * Session functions * * @package functions * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: sessions.php retrofitted for v1.3.0.1 $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } if (STORE_SESSIONS == 'db') { if (defined('DIR_WS_ADMIN')) { if (!$SESS_LIFE = (SESSION_TIMEOUT_ADMIN + 900)) { $SESS_LIFE = (SESSION_TIMEOUT_ADMIN + 900); } } else { 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) { global $db; $qid = "select value from " . TABLE_SESSIONS . " where sesskey = '" . zen_db_input($key) . "' and expiry > '" . time() . "'"; $value = $db->Execute($qid); if (isset($value->fields['value']) && $value->fields['value']) { return $value->fields['value']; } return (""); } function _sess_write($key, $val) { global $db; global $SESS_LIFE; $expiry = time() + $SESS_LIFE; $value = $val; $qid = "select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . zen_db_input($key) . "'"; $total = $db->Execute($qid); if ($total->fields['total'] > 0) { $sql = "update " . TABLE_SESSIONS . " set expiry = '" . zen_db_input($expiry) . "', value = '" . zen_db_input($value) . "' where sesskey = '" . zen_db_input($key) . "'"; return $db->Execute($sql); } else { $sql = "insert into " . TABLE_SESSIONS . " values ('" . zen_db_input($key) . "', '" . zen_db_input($expiry) . "', '" . zen_db_input($value) . "')"; return $db->Execute($sql); } } function _sess_destroy($key) { global $db; $sql = "delete from " . TABLE_SESSIONS . " where sesskey = '" . zen_db_input($key) . "'"; return $db->Execute($sql); } function _sess_gc($maxlifetime) { global $db; $sql = "delete from " . TABLE_SESSIONS . " where expiry < " . time(); $db->Execute($sql); return true; } session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } function zen_session_start() { @ini_set('session.gc_probability', 1); @ini_set('session.gc_divisor', 2); if (defined('DIR_WS_ADMIN')) { @ini_set('session.gc_maxlifetime', (SESSION_TIMEOUT_ADMIN < 900 ? (SESSION_TIMEOUT_ADMIN + 900) : SESSION_TIMEOUT_ADMIN)); } return session_start(); } function zen_session_register($variable) { die('This function has been deprecated. Please use Register Globals Off compatible code'); } function zen_session_is_registered($variable) { die('This function has been deprecated. Please use Register Globals Off compatible code'); } function zen_session_unregister($variable) { die('This function has been deprecated. Please use Register Globals Off compatible code'); } function zen_session_id($sessid = '') { if (!empty($sessid)) { return session_id($sessid); } else { return session_id(); } } function zen_session_name($name = '') { if (!empty($name)) { return session_name($name); } else { return session_name(); } } function zen_session_close() { if (function_exists('session_close')) { return session_close(); } } function zen_session_destroy() { return session_destroy(); } function zen_session_save_path($path = '') { if (!empty($path)) { return session_save_path($path); } else { return session_save_path(); } } function zen_session_recreate() { global $http_domain, $https_domain, $current_domain; if ($http_domain == $https_domain) { $saveSession = $_SESSION; $oldSessID = session_id(); session_regenerate_id(); $newSessID = session_id(); session_id($oldSessID); session_id($newSessID); if (STORE_SESSIONS == 'db') { session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } session_start(); $_SESSION = $saveSession; if function_exists('whos_online_session_recreate') whos_online_session_recreate($oldSessID, $newSessID); } else { } } ?>
28 Sep 2006, 8:26 AM
#5
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Customers unable to login OR create new account

Ok, did what you said but got an error in line 165 of sessions.php after doing it, and couldn't access my admin. Switched the sessions.php file back to as it was now.

This is a real amateur question, but is there a way to upgrade without losing what I've designed and the specialized javascript I've put into the site? You lose just about any customizations you've done, right?

28 Sep 2006, 2:26 PM
#6
austy25 avatar

austy25

Zen Follower

Join Date:
Feb 2006
Posts:
248
Plugin Contributions:
0

Re: Customers unable to login OR create new account

First off : For the first time yesterday someone told me as well that they could not create an account but then I created a fake one for her - deleted it - and then all of a sudden she was able to do it. I think she just put in bogus information and that's what caused it but others are able to log in and create just fine so I am not worried about it .. I hope you get it figured out

Second you can back-up thru the zencart Admin>Tools>Backup SQL (you have to download that first) or you can also backup thru MySQL ... that's thru your hosting - just make sure you select all and then save it.
GL to you !!!!!

28 Sep 2006, 10:16 PM
#7
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Customers unable to login OR create new account

Actally, my store isn't live, so I'm the only one that's been trying to create a user or login. I've tried new names, old names, bogus names, EVERYTHING.

Thanks though!

Still looking for a resolution...

29 Sep 2006, 12:48 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Customers unable to login OR create new account

Okay, if the site is not live, then why don't you upgrade to the latest code too?

Have you got SSL on or off? Does turning it off make any difference?
(configure.php ... ENABLE_SSL = false)

30 Sep 2006, 7:35 AM
#9
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I have not upgraded because the site has been modified so thoroughly at this point, and redesigning it would be very costly and time-consuming. I don't understand how you can upgrade without losing almost every bit of modification you've done.

If there is a way save at least the majority of my customizations, I'm 100% willing to upgrade.

2 Oct 2006, 6:12 PM
#10
davik1000 avatar

davik1000

New Zenner

Join Date:
Aug 2006
Posts:
28
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I changed from totalchoicehosting.com to bluehost.com and now I can't create an account whether it's set to ssl or not, nor if ssl is enabled can I login to my admin. I'm having this problem with 1.3.0.1, 1.3.0.2 and 1.3.5. With totalchoice hosting I didnt have any problems like this.

My problem isn't involving problems with the state drop down box.

Any ideas?

TIA

2 Oct 2006, 11:29 PM
#11
bobdog avatar

bobdog

Totally Zenned

Join Date:
Mar 2006
Location:
Fresno, California
Posts:
590
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I don't think it's a bluehost problem, I have two shopping carts with them.

And I've never had one single server related problem

3 Oct 2006, 8:55 AM
#12
empirenine avatar

empirenine

New Zenner

Join Date:
May 2006
Posts:
37
Plugin Contributions:
0

Re: Customers unable to login OR create new account

Just a quick note that might help those of you still having this problem.

My "includes/template/YOUR_TEMPLATE/templates/tpl_login_default.php" file had been modified from the original version. The page had been split into vertical halves, putting the form area in the right half and inserting 3 random product images/links in the right.

I haven't taken the time to go in and find the absolute root of the issue in my corrupt file, but I would recommend that anyone having this error try replacing tpl_login_default.php with a fresh version, just for posterity.

I am now in the process of upgrading to 1.3.5 with signifigant hesitation due to the amount of labor involved in doing so.

Sincere thanks go out to those of you that tried to help!

4 Oct 2006, 9:20 PM
#13
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: Customers unable to login OR create new account

Hi,

I just had a customer realize last night (and I verfied it) that users can create accounts in IE just fine. However in Firefox, each one gets kicked back saying to "select a state from the dropdown" which isn't there initially. HOwever once you do choose a state in the dropdown, it just keeps cycling around with select a state and will not accept new users.

This site was originally 1.30 upgraded to 1.302 and finally 1.35. I have tried replacing the log-in template page with the one in a fresh install package to no avail. I tried installing the spit log-in mod, again still did the same thing, so removed the mod and still the same.

Again, this is only in Firefox.

betty

6 Oct 2006, 7:29 PM
#14
linkedla avatar

linkedla

New Zenner

Join Date:
Mar 2005
Location:
Bogotá, Colombia
Posts:
32
Plugin Contributions:
1

Re: Customers unable to login OR create new account

I was having the same problem for users creating new accounts or trying to start a new sassion, I did made the change Dr. Byte sugest but only the first part, Y did not replace the file and leave the sessions part like this:
in admin ->configuration -> sessions>
Cookie Domain True
Force Cookie Use True
Check SSL Session ID True
Check User Agent True
Check IP Address True
Prevent Spider Sessions True
Recreate Session False
IP to Host Conversion Status true

It seems to solve the problem, I have ZC 132, PHP 4.4.4, SSL and I am hosted in MidPhase servers under my own VPS.
May this can help some one else, since the problem for me was I had Recreate Sessions in true, then I put it back to false and thats it, it was solved.

6 Oct 2006, 8:47 PM
#15
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I have tried every suggestion in this thread, even tried the file change even though I'm running v1.35 (btw got the line 165 error also), and users
still get the state dropdown error in Firefox, and are unable to sign-up.

Any further ideas?

thank you,

betty

7 Oct 2006, 1:29 AM
#16
optikalsaint avatar

optikalsaint

New Zenner

Join Date:
Aug 2006
Posts:
31
Plugin Contributions:
0

Re: Customers unable to login OR create new account

linkedla:

I was having the same problem for users creating new accounts or trying to start a new sassion, I did made the change Dr. Byte sugest but only the first part, Y did not replace the file and leave the sessions part like this:
in admin ->configuration -> sessions>
Cookie Domain True
Force Cookie Use True
Check SSL Session ID True
Check User Agent True
Check IP Address True
Prevent Spider Sessions True
Recreate Session False
IP to Host Conversion Status true

It seems to solve the problem, I have ZC 132, PHP 4.4.4, SSL and I am hosted in MidPhase servers under my own VPS.
May this can help some one else, since the problem for me was I had Recreate Sessions in true, then I put it back to false and thats it, it was solved.

this worked for me! thanks!

after i installed SSL on my site and enabled it to "true" in my configure.php file, i was unable to have anyone log in or create an account. i have been trying to tackle this for hours! thank you linkedla!

7 Oct 2006, 1:38 AM
#17
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I had also recently set SSL to true.

I set my sessions to the way Dr. Byte had them and it didn't help.

Are the settings in linkedla's post the ones I need to change them to or what they were before changing them to Dr. Bytes method?

Sorry, but I have been trying everything in this thread and just can't remember if I changed to what was in the post or not.

betty

7 Oct 2006, 3:22 AM
#18
optikalsaint avatar

optikalsaint

New Zenner

Join Date:
Aug 2006
Posts:
31
Plugin Contributions:
0

Re: Customers unable to login OR create new account

bettysue:

I had also recently set SSL to true.

I set my sessions to the way Dr. Byte had them and it didn't help.

Are the settings in linkedla's post the ones I need to change them to or what they were before changing them to Dr. Bytes method?

Sorry, but I have been trying everything in this thread and just can't remember if I changed to what was in the post or not.

betty

i tried Dr. Bytes settings but did not make the changes to the file that he suggested. when that did not work i tried linkedla's solution and it worked perfectly. :smile:

7 Oct 2006, 3:29 AM
#19
lala_g_clef_jewelry avatar

lala_g_clef_jewelry

Zen Follower

Join Date:
Apr 2006
Location:
Kansas
Posts:
233
Plugin Contributions:
0

Re: Customers unable to login OR create new account

I know this will sounds odd... but on the advice of another zenner i deleted, yes you read that right, deleted includes -> templates -> future_zen (template im using) -> templates folder. totally deleted it. (well first i did d/l it to my desktop so i have a copy.

all the sudden i didnt have a problem adding new users.

make sense? no? not to me either, lol

but i did go in and reupload that folder and then no more new users. so i deleted ANY and ALL files in that folder having to do with creating an account.

this seemed to have worked as you can now create new users at my site.

i tired a lot of the other solutions out there to no avail, so i thought id throw this one out there too, just in case it helped someone.

9 Oct 2006, 11:11 PM
#20
linkedla avatar

linkedla

New Zenner

Join Date:
Mar 2005
Location:
Bogotá, Colombia
Posts:
32
Plugin Contributions:
1

Re: Customers unable to login OR create new account

I am very happy my solution can work for you! ::happy: :smile: