Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Austin, Texas, US
    Posts
    216
    Plugin Contributions
    0

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

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default 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?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jun 2005
    Location
    Austin, Texas, US
    Posts
    216
    Plugin Contributions
    0

    Default Re: Language File Not Loading, Fails to Translate Defines

    Quote Originally Posted by Kim View Post
    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.

  4. #4
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Language File Not Loading, Fails to Translate Defines

    What other languages are you using?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Jun 2005
    Location
    Austin, Texas, US
    Posts
    216
    Plugin Contributions
    0

    Default Re: Language File Not Loading, Fails to Translate Defines

    Quote Originally Posted by Kim View Post
    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.

  6. #6
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default 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?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default 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.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Dec 2006
    Location
    Austin, TX
    Posts
    6
    Plugin Contributions
    0

    Default 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]

  9. #9
    Join Date
    Dec 2006
    Location
    Austin, TX
    Posts
    6
    Plugin Contributions
    0

    Default Re: Intermittent Language Defines Stop Working

    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

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Intermittent Language Defines Stop Working

    Quote Originally Posted by jacdesigner View Post
    In regards to server setup:

    SUN OS (Solaris)
    MySQL 4.0.26
    Apache/1.3.37
    PHP 4.4.7 (Zend: 1.3.0)
    Quote Originally Posted by cachehit View Post
    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.
    .

    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.

 

 

Similar Threads

  1. Re: defines not loading correctly all the time
    By Blastedtgirl in forum General Questions
    Replies: 1
    Last Post: 8 Apr 2011, 12:46 PM
  2. defines not loading correctly all the time
    By kamion in forum Bug Reports
    Replies: 13
    Last Post: 8 Apr 2011, 10:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg