Forums / General Questions / Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Locked

Views: 1,857

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
12 Jun 2010, 12:01 PM
#1
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

We are desperate for help finding the problem in our Zen Cart store. We are using a Japanese language pack and everything was working great for almost 2 years, but our host decided to upgrade their PHP/MySQL version and suddenly the communication between the database and Zen Cart are not functioning in UTF-8 any longer.

Everything displays correctly in phpMyAdmin, but shows up as "???" when loaded by the browser.

Our setup:
URL: http://lae.xtr.jp
Zen Cart 1.3.8a with UTF-8/Japanese language pack
PHP/MySQL 5.1.45

What we have already tried:
Restoring database from backup
Doing fresh install
Installed
Upgrading to Zen Cart 1.3.9d (same problem)
Installing website on a different server running PHP 5.0.45 and running all the same attempted fixes (same problem, so the issue is not the server)

We greatly appreciate any assistance in tracking this problem down as our store is pretty much dead in the water until we get this fixed.

12 Jun 2010, 12:28 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

This post may help:

http://www.zen-cart.com/forum/showthread.php?p=896903#post896903

Just change english.php to your language

Interested to hear if you had success

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

12 Jun 2010, 1:13 PM
#3
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Thank you for your response. Yes those files were all changed to UTF-8 for Japanese and iso-8859-1 for english long ago when we installed the language pack. I did try setting it to the other character set as you suggest, but the problem didn't occur until after updating to PHP/MySQL 5, so unfortunately that is not the problem (as much as I wish it were ;))

Thank you again for your suggestion

13 Jun 2010, 5:57 AM
#4
huyuchengus avatar

huyuchengus

New Zenner

Join Date:
May 2010
Posts:
2
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Did you check your database?

Are those data in your database correct or not?

The tables in your database are UTF-8 or not?

Never Had A Dream Come True

http://forums.hawebs.net/computer/

13 Jun 2010, 1:02 PM
#5
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Hi Thank you for your reply.
Yes, we did check the database and it is UTF-8 and the Japanese characters are displaying correctly in their respective entries.

It seems to be a communication error between PHP 5.1.45 and Zen Cart

Thank you again

13 Jun 2010, 1:19 PM
#6
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

You may want to try and replicate this problem by installing your site on a local WAMP or XAMPP server.

I know that in WAMP you can download and install various php versions (not sure about XAMPP). Then observe which php version (if any) plays up - so to speak..

Important though to have exactly the same settings locally as you are having right now on your live server.

It may be worth playing around with that to see if you are getting the same response.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Jun 2010, 1:27 PM
#7
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

have you upgraded your store to latest zencart version ?
there has been some changed in query_factory.php , as result it needs separate php file to set the query in UTF 8 charset .

13 Jun 2010, 1:31 PM
#8
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

tony_sar:

have you upgraded your store to latest zencart version ?
there has been some changed in query_factory.php , as result it needs separate php file to set the query in UTF 8 charset .

gingabox upgraded to 1.3.9d - same result (see first post)

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Jun 2010, 1:50 PM
#9
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Look at this posting .

http://www.zen-cart.com/forum/showthread.php?t=153582

for 139x version of zencart

13 Jun 2010, 2:10 PM
#10
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

tony_sar:

Look at this posting .

http://www.zen-cart.com/forum/showthread.php?t=153582

for 139x version of zencart

Good pointer - thanks mate, will keep that "on file" :smile:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Jun 2010, 2:20 PM
#11
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

you welcome :smile:
hope this fix the problem for gingabox :unsure:

13 Jun 2010, 4:12 PM
#12
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

Hey guys, thanks for the pointers... we will try upgrading to 1.3.9d again and follow the steps outlined in the post you provided. Will report back as soon as we get that done and test it out.

Thanks again and ttys

15 Jun 2010, 4:43 AM
#13
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

tony_sar:

have you upgraded your store to latest zencart version ?
there has been some changed in query_factory.php , as result it needs separate php file to set the query in UTF 8 charset .

Tony_sar... I don't know why the query_factory.php fix didn't work the first 3 times... but we did it yet again (after upgrading to 1.3.9d) and it fixed the issue. So I guess for those having this same problem, check that out and although I don't know where we downloaded it from (it was quite some time ago) there is a query_factory.php file out there for UTF 8 charsets.

Thanks again everyone!

15 Jun 2010, 4:45 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: Desperate for help - Zen Cart / PHP 5 / UTF-8 issues

The query_factory.php file for v1.3.9 already includes support for UTF-8. You just need to set a define for DB_CHARSET to 'utf8' in /includes/extra_configures/db_charset.php and the rest is automatic. No need to edit the query_factory.php file at all.

.
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.