If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading to 1.5.x / Wrong charset and customers cannot login after upgrade

Wrong charset and customers cannot login after upgrade

Started by scrap on 21 Mar 2013, 8:27 PM · Views: 1,574

Results 1 to 6 of 6
21 Mar 2013, 8:27 PM
#1
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Wrong charset and customers cannot login after upgrade

Hi
I've upgraded a local copy of my live site from 1.3.9h to 1.5.1. Everything was successful, but now I cannot login to the site front using my test accounts.
When login to the backend and choose English there are some error characters as well, but not in my native language. Apart from that, everything looks fine. If I change utf-8 to my own locales charset in admin/languages/english.php the error characters are corrected.

I followed the upgrade guides by drByte (thanks!) but I also removed all addons I had installed (like Easypopulate, Imagehandler etc) just to be sure. Tested the site between every uninstall.

But then I copied over the files from 1.5.1 and ran the DB upgrade and since then I experience the charset bug(s?).

I've compared the database charsets and they're both latin.
I've also compared the hashed passwords between versions and the hashes are the same.

I can create new customers and the new customers can log in.

No errors in php, apache or the myDebug-files.

I'll give it another go in a day or so

21 Mar 2013, 9:31 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Wrong charset and customers cannot login after upgrade

scrap:

I've compared the database charsets and they're both latin.
Okay. So your database is still using latin.
Then you'll also need to make sure your Zen Cart is using whatever character set it was using in your 1.3.9. Look for the "define('CHARSET', 'xxxxxxxxx') in your language files, and put back what your old site uses.

Explained here: http://www.zen-cart.com/content.php?313-should-i-convert-my-store-from-iso-8859-1-to-utf8

.
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 Mar 2013, 8:25 PM
#3
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Re: Wrong charset and customers cannot login after upgrade

DrByte:

Okay. So your database is still using latin.
Then you'll also need to make sure your Zen Cart is using whatever character set it was using in your 1.3.9. Look for the "define('CHARSET', 'xxxxxxxxx') in your language files, and put back what your old site uses.

Explained here: http://www.zen-cart.com/content.php?313-should-i-convert-my-store-from-iso-8859-1-to-utf8

Thanks!
Two quick Qs

  1. Does this really affect customer passwords (i.e. customers not being able to log in)?

  2. I have a stock, unmodified 1.3.9h (the version I'm coming from) install as well. Its DB says latin1_general_ci while mine is (for whatever reason) latin1_swedish_ci. Is there a real difference between the two and should I change the "latin1" referenced in the link to something even more specific? I've tried iso-8859-1.

Anyhow, I tried it just now but to no avail. I'll investigate more tomorrow. Thanks for the link!

23 Mar 2013, 11:03 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Wrong charset and customers cannot login after upgrade

scrap:

  1. Does this really affect customer passwords (i.e. customers not being able to log in)?It hasn't for me, but I'm not using a hybrid of character sets like you are.
    scrap:

  2. I have a stock, unmodified 1.3.9h (the version I'm coming from) install as well. Its DB says latin1_general_ci while mine is (for whatever reason) latin1_swedish_ci. Is there a real difference between the twoIf it was working fine before, leave it alone.
    scrap:

and should I change the "latin1" referenced in the link to something even more specific? I've tried iso-8859-1.No. Leave the database ALONE. And put your language files back to what CHARSET they were using in the prior version. That's what the article at that link was telling you.

If you don't have a reason to change the CHARSET, then DON'T! If you don't know what you're doing when considering changing it, then DON'T! First research and test it on a separate site until you've resolved all possible complications and tested ALL the data in ALL tables to be sure you've not damaged anything.

.
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 Mar 2013, 12:25 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Wrong charset and customers cannot login after upgrade

I don't know if this is included in the overall instructions, but ...

Since you're upgrading from v1.3.9h, neither of your configure.php files contain a define for DB_CHARSET. For your case, you should add (down towards the other database definitions):

define('DB_CHARSET', 'latin1');

Otherwise, the v1.5.0 and later code sets the DB_CHARSET value to utf8 if it's not defined!

26 Mar 2013, 2:58 PM
#6
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Re: Wrong charset and customers cannot login after upgrade

Thanks again both of you. Everything is working.

Sometimes one get caught with the head in the behind. Note to self: remember to chech modules/pages/login/header.php for admin master password addon and update the code accordingly...