Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Language File Not Loading, Fails to Translate Defines

Language File Not Loading, Fails to Translate Defines

Locked

Views: 2,787

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
11 Jul 2007, 9:50 PM
#1
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Language File Not Loading, Fails to Translate Defines

I have had this problem intermittently for weeks now, and I have not had any luck finding any posts about this on the forums. Please lend any help, suggestions that you can!

WHAT I HAVE:
New install (not upgrade) Zencart 1.3.7, using a custom template based on Classic in the overrides directories. There are very few custom modules on this site, only one payment gateway setting (using preinstalled AIM mod). These issues occurred previous to setting up that module.

WHAT IS HAPPENING:
Periodically, the template will display with various language tags, as if it "gave up" translating everything. We have looked into it on the back end and it seems like the language file just doesn't get loaded (template doesn't read it). But only SOMETIMES, intermittently. If you refresh a few times, it will start working again, then you go to another page, it fails, then again and again, then its ok....etc. We enabled a log file and no errors are showing up on the logs.

INTERESTING INFO:
We notice that if we do a hard restart of Apache web server, things start working again for a little while. Then the problem crops up again later. But again, just intermittently.

We also tried rebuilding PHP and recompiling it. This fixed the issue (seemedly) for a little while, then about a week passed and it cropped up again. And nothing has changed on the server since.

This is the only Zencart site that is having this problem, out of several others that we have developed and hosted.

IDEAS:
Someone suggested maybe I should copy all of the default language files into my custom directories (even the ones I did not change). Although this sort of defeats the ease of the override system, I am wondering if anyone sees harm in this. Perhaps it would help the system load up the language files if they are all in one place?

It would be nice to learn that someone on this planet has experience this issue and knows the underlying cause. I will share a screenshot shortly.

11 Jul 2007, 9:56 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

Does it happen with all language files or only certain ones? Where do you have the language overrides in the Zen Cart structure?

11 Jul 2007, 10:19 PM
#3
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

Kim:

Does it happen with all language files or only certain ones? Where do you have the language overrides in the Zen Cart structure?

It seems to happen for all elements across the site, including page titles, link names, category names, box headings, button images, product names, and others. Sometimes a few elements will display correctly (such as the top page title will show fine, or one of the box headings will show) and the rest will just display in the tag format (such as: CATEGORY_BOX_HEADING or something like that).

My language files are stored in their respective custom template folders such as:
/includes/languages/english/custom/..
and
/includes/languages/custom/english.php

If you would like me to dig for any other details, feel free to ask.

11 Jul 2007, 10:25 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

What other languages are you using?

12 Jul 2007, 3:59 PM
#5
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

Kim:

What other languages are you using?

Hi, Kim,

I am only using English. I have no other language packs installed at this time.
Thank you for trying to help.

12 Jul 2007, 4:32 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

What sort of server are you using? PHP and MYSQL versions? What are you to upload the files? What are you using to edit?

12 Jul 2007, 4:41 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Language File Not Loading, Fails to Translate Defines

Normally this sort of intermittent problem would suggest a developing hardware problem. However, you have also posted several times about files and classes not loading properly. Is it possible that this is a symptom of slightly dodgy upload originally, or even problems with your original Zen Cart release package?

If it's within your control, I'd also do a check on the physical media upon which your Zen Cart is hosted to ensure that there aren't problems there.

12 Jul 2007, 5:38 PM
#8
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

In regards to server setup:

SUN OS (Solaris)
MySQL 4.0.26
Apache/1.3.37
PHP 4.4.7 (Zend: 1.3.0)

Thank you Kuroi for the hardware failure suggestion. I will ask the admin to start exploring that possiblity.

16 Jul 2007, 10:05 PM
#9
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

Just a brief update. We did not discover any problems with server hardware, and there were also no other signs of that type of issue. We have enabled some additional PHP error logging on top of what was already in place, in hopes that something will give us clues. If anyone has other suggestions or advice, I am all ears.

23 May 2008, 10:31 PM
#10
cachehit avatar

cachehit

New Zenner

Join Date:
Dec 2006
Location:
Austin, TX
Posts:
6
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

Hello,

We are running several zc sites on various Linux and Solaris servers, with a mysql4 on Linux backend. For the most part it works great.

Howevever... on one of our 1.3.7 installations on a SPARC Solaris 8 machine it is exhibiting some very odd behaviour. This is with apache 1.3.39 and php 4.4.8. Basically, after an unknown amount of time, somtimes an hour, sometimes a couple days, the site stops interpreting the language file and instead when you view it it prints out bunch of things like TEXT_GREETING at the top, TEXT_BUY, TEXT_NOW, TEXT_* instead of the things that these constants are defined() to in includes/languages/english and includes/languages/english/custom. Only a hard apache restart will fix it. apachectl restart does not do it - you have to kill httpd and start it back up.

The database connection is setup as non-persistent. Oddly, everything still seems to work in the system even when it is not printing out the proper text - the products still come up, you can add to shopping cart, etc. Its just like the language files are not being processed.

Thanks for any insight.

--
John
[email protected]

28 May 2008, 7:33 PM
#11
cachehit avatar

cachehit

New Zenner

Join Date:
Dec 2006
Location:
Austin, TX
Posts:
6
Plugin Contributions:
0

Re: Language File Not Loading, Fails to Translate Defines

I don't know for an absolute fact at what layer - the OS (SPARC Solaris 8), apache (1.3.39),. php (4.4.8), zen-cart (1.3.7), or somewhere in between - that this bug resides, so my apologies if I've posted in the wrong forum. I do know that the Solaris machine where this bug crops up is hosting many dozens of websites from the same apache config and, even as the zen-cart misbehavior begins, every other site, even every other PHP site and the few other sites using mod_frontpage or mod_perl, all function fine. As I said, even Zen-cart continues working except it seems to have forgotten how to interpret the define()'s (or it can't find them..).

I have php configured to log to a file, at this time actually with error_report set tp E_ALL because I'm so perplexed by this whole thing. Regardless it doesn't log any errors when this behavior begins. Likewise apache logs no errors.

I'm still very curious if anyone has seen anything similar at all to this behavior.

thanks,

John

29 May 2008, 1:43 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Language File Not Loading, Fails to Translate Defines

jacdesigner:

In regards to server setup:

SUN OS (Solaris)
MySQL 4.0.26
Apache/1.3.37
PHP 4.4.7 (Zend: 1.3.0)

cachehit:

the OS (SPARC Solaris 8), apache (1.3.39),. php (4.4.8), zen-cart (1.3.7)

The only common thread I see there is Solaris. Unfortunately I don't have the budget to purchase and configure such a machine here for testing, let alone the resources to diagnose possible issues in using it as a webserver platform.

I suppose the ideal troubleshooting approach would be to get PHP to log every attempt at doing a "require" or "include" operation, along with its success or failure, and of course which session ID the request was occurring in.

But, since you've indicated that there have been no PHP errors logged when these problems happen, I suspect it's not a PHP-specific problem, and is actually happening at a higher level ... which technically means it wouldn't be a Zen Cart problem specifically. But, lest I sound like I'm pointing fingers and you get all defensive, I offer the following suggestions:

  • check the amount of RAM configured for PHP instances.

  • check the number of file handles that PHP (or actually Apache, since PHP is likely running as an apache module and therefore Apache is the owner of the PHP processes) is limited to using at a given time. How does that compare against Filesystem limits/settings? or disk quotas? Does raising that limit make any difference?

  • what happens if you change PHP to not be an Apache module, and instead run as a CGI application? (NOTE: I normally do NOT recommend that approach, as it usually creates a number of headaches and should not be done unless you have a good reason for doing it and know how to properly configure system permissions etc) .... you might try this during off-hours, since it will likely break most sites running PHP on your server until everyone changes permissions levels. Read up on the apache and/or php websites or maybe a site like webhostingtalk.com about configuring your server that way.

  • what is the server load at the time when it happens?

  • is there any way to narrow down the symptoms of all other factors that may be occurring at the time of failure? number of connections, number of open files, amount of ram allocated to various processes, maybe each process, whether any other PHP-based sites are affected by it, is there anything in .htaccess rules causing increased server load, etc etc.