If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading from 1.3.x to 1.3.9 / [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

[Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Locked

Started by robax on 23 Apr 2010, 11:01 AM · Views: 5,415

Results 1 to 20 of 33
This thread is locked. New replies are disabled.
23 Apr 2010, 11:01 AM
#1
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

[Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Hi all,

I've done this twice now just to confirm I hadn't done anything wrong the first time.

I'm upgrading from 1.3.8a to 1.3.9a

I only had Image Handler 2.0 installed but I removed it for the second test just in case it was causing anything.

After the upgrade, everything looks good, but customers can no longer sign in. There is no error. it's as if the cart didnt' have cookies, but I've checked and rechecked the cache folder permissions and it's fine. It ran for a year without any problem and I run two other zen carts on the same IIS7 server. They're older versions however.

I also did a test upgrade of a fresh 1.3.8a to 1.3.9a and that seemed to work fine. It's my big site full of products that has the problem.

Oh, and I can sign into teh admin just fine. There doesn't appear to be any problem in there.

I'll have to revert it back to 1.3.8a again in the meantime.

Any ideas?
Regards,
Rob

23 Apr 2010, 2:30 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

robax:

I also did a test upgrade of a fresh 1.3.8a to 1.3.9a and that seemed to work fine. It's my big site full of products that has the problem.
So, you're saying that the login problems ONLY happen after you import and upgrade your data?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Apr 2010, 3:10 PM
#3
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Hi Dr Byte,

I did two trial upgrades of my main website, and restored to backup each time after it showed the login problems.

This website is fully populated with 800+ products and is due to go live shortly. It is in good order and hasn't been messed up with piles of mods and addons.

The 'fresh' 138a to 139a was a separate upgrade that I carried out on a freshly-installed 138a with only a couple of demo products. I did this as an experiment to see if it would also have the login problems - it didn't.

Since the post above, I have done a compare of the file system, and apart from the define_pages, some email templates, and my custom template, the file systems are identical.

I have also compared folder permissions between the two installs and they match as well - and it worked for months prior to this anyway.

This leads me to believe it is a database problem.

Any advice is very much appreciated, and I can pm a link to the site if it'd help.
Rob

23 Apr 2010, 3:21 PM
#4
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

stop the press!
I've just found something interesting that may be a clue.. and maybe it's not a database issue after all.

The template has a menu with links leading to login, account, shopping cart, checkout. I've used the tempalte for all three Zen Zrts I've made and it has always been great.

When I sign in as a customer and then click any of those menu links, I get signed out. That is what I have been describing in this thread.

Now, here's the possible clue:
At the bottom of the template are some Ez-Pages links in the footer. One of them is the My Account link. If I sign in and click on that link, I remain signed in and can view and change my address and password. I note that I can also click on the little "More" link in the sidebox cart and it will display the cart with me still signed in. It's only the top menu links that no longer work in 1.3.9

This template is also the only significant file system difference between my trial upgrades. I think it's now clear that if I reverted the site back to the defaul ZC template, everything would work.

So my question is - What has changed about the template or menu links that would cause a sign-out with an older template that has worked fine in every version from 1.302 to 1.3.8?

Thanks for any further comments.
Rbo

23 Apr 2010, 3:45 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

robax:

So my question is - What has changed about the template or menu links that would cause a sign-out with an older template
As far as template files goes, nothing.

If you switch to the Classic template, does login work properly?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Apr 2010, 12:37 AM
#6
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

When I change back to Classic Contemporary Green, the menu links at the top (to account, cart, checkout) all work.

One thing that is obvious is that the menu links all show a zenid in the status bar when hovered on, like this:

http://www.domain.com/index.php?main_page=shopping_cart&zenidwouldbehere

But the links in my custom template, are like this:
http://www.domain.com/index.php?main_page=shopping_cart

Further investigation shows me that clicking any link that doesn't have the zenid on it causes a sign-out in the 1.3.9a upgraded site, but does not do so in the previous versions.

Yes, this summarises what is happening:

  • Prior to upgrading, clicking or manually entering any link within the same domain will retain the signed-in status.
  • After upgrading, the only way to remain signed-in is to follow links that have a zenid.

So, it has something to do with sessions. How does ZC maintain the visitor sessions apart from the zenid in the URL? That'll be where my problem lies.

Thanks for any further advice
Rob

24 Apr 2010, 1:26 AM
#7
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Adding to my last reply...

As a test, I changed the config to not use the db for sessions, and when browsing the site I can see sesssions files being created in the cache folder. However it has made no difference to the problem.

Is is perhaps cookies?

24 Apr 2010, 1:34 AM
#8
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

And another possible clue...

I enabled the "Force Cookie Use" in the admin area, but that causes logins to fail altogether with the message "There was a security error when trying to login."

When I enable the same option in a separate working 1.3.8 cart, it works fine, without any errors.

I'll keep hunting.
Rob

24 Apr 2010, 1:40 AM
#9
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

I had an identical problem recently. The sessions were not working on a unix server but the page rendered ok, but on a windows server I got blank pages on login.
I enabled strict error reporting and it pointed me to a file where there were some spaces in front of the initial <?php.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

24 Apr 2010, 1:54 AM
#10
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Thanks for the reply,

Can you possibly let me know where you enabled strict error reporting.. was that in Zen Cart, PHP or in IIS perhaps?

Just to update progress:
I'm working through the "Security Error during Login as Customer" section, halfway down this page
zencart.posterous.com/troubleshooting-login-related

My template did not have a modified tpl_login_default.php, but it does have its own tpl_timeout_default.php. So I updated it to match the default, but sadly that also hasn't solved the issue, and the same error is still reported when cookie use is forced.

Regards,
Rob

24 Apr 2010, 1:57 AM
#11
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

There is a FAQ about this here, section 2.b.

https://www.zen-cart.com/tutorials/index.php?article=82

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

24 Apr 2010, 2:24 AM
#12
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Thanks for the link. I enabled that and the site says "STRICT ERROR REPORTING IS ON" at the top of the page when using the default Classic template, so I'll assume it is reporting errors.

However, no errors are reported when browsing around and signing in and out.

When I enable "Force cookies use" I still see the "There was a security error when trying to login." message, but no further detail.

I can also see a few debug files in the cache folder, but those having nothing relevant in them.

I'm convninced it's a cookie issue, but am not convinced it is template-related because the Classic template also reports the "There was a security error when trying to login." error when cookie use is forced. That seems to be the main difference between the upgraded and non-upgraded site.

I'll go have a coffee and then return for some more hunting.
Rob

24 Apr 2010, 3:33 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Turn OFF the "force cookie use" setting, and put back any other settings you're messing with in the Sessions area.
The ONLY setting you should ever touch in that screen is the Session Directory: it should contain the FULL path pointing to your /cache/ folder (ie: same path as DIR_FS_SQL_CACHE in your configure.php files). I recommend you double-check that setting since your upgrade.
Messing with any of the other settings in that screen will typically land you in trouble unless you have VERY specific reasons for changing them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Apr 2010, 7:06 AM
#14
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Do you experience the login problem on multiple pc's / browsers?

I had this problem before, and the mozilla cache cleaner / pc restart got me through it.

good luck

24 Apr 2010, 8:31 AM
#15
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Yep, I only switched force-cookies on for a test, and then made the point that a non-upgraded site works like that, whilst the upgraded site does not - That looked like a good clue to me.

I'm definitely clearing cache ands restarting a lot, but I went ahead in any case and tested it with some other browsers, seeing as I have the big 5 installed.

The result is very odd and may be another clue to someone in the know: FF, IE, Safari and Opera all behave the same and the user gets signed out. But Google Chrome works fine. How weird is that??

I then also tested it using Opera 9.7 and IE6 mobile from my phone and they both had the sign-out issue. I've also checked IE and FF directly from the web server's desktop... they also sign out.

It's bizarre that Chrome works, but maybe it has some special way of holding onto sessions.

My next step is going to be to install 1.3.9a from scratch and not via an upgrade, just to see how it behaves. I'll do that now.

24 Apr 2010, 9:04 AM
#16
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

ok yep, a 100% fresh install of 139a has the logout issue, whilst a fresh install of 138a does not.

So I'm wondering what the difference is in the cookies/sessions/login or whatever else is involved in handling the signed-in state of the user between these versions?

I'll go and study the change logs.

24 Apr 2010, 10:19 AM
#17
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Drbyte, I've created a simple demo of teh problem in case you have a moment to look at it and see what you think. I'll leave this up for a couple of days.

Here is the demonstration:

Sign into each of these brand new default Zen cart installs using the credentials provided.

http://www.toscana.co.nz (138a)
http://www.dnn101.com (139a)

[email protected]
pass: zencarttest

After signing in, confirm that you can view your account details, cart and the checkout.

And now, to demonstrate the difference:
Click the "Powered by Zencart" logo.

On the 139a site you will be signed out.

You will be signed out of 139a if you click any internal link that doesn't have a zenid in the URL. The 138a site doesn't care about this.

:lookaroun

26 Apr 2010, 6:22 AM
#18
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Any chance this can be looked at to confirm whether there's a bug or not?
The demonstation I created above is pretty clear.
Regards
Rob

26 Apr 2010, 4:28 PM
#19
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,949
Plugin Contributions:
3

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Hi,

Can you try this.

On the v139 site in
includes/init_includes/init_sessions.php

change this line (circa line 36)

session_set_cookie_params(0, $path, (zen_not_null($current_domain) ? '.' . $current_domain : ''));

to

session_set_cookie_params(0, $path, (zen_not_null($current_domain) ? $current_domain : ''));

and see if that helps

26 Apr 2010, 4:35 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: [Fixed 1.3.9c] 1.3.8a to 1.3.9a my customers cannot sign in

Also, are these sites hosted on Windows IIS? Or on Linux Apache?
Are they both on the same server? Or different servers?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.