Thread: Cache Error

Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Cache Error

    Our add to cart wasn't working for a few hours this morning and really wasn't sure what was going on. Looking into the error logging file shows this error:

    [28-Apr-2010 05:18:12] PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /DELETED/DELETED/public_html/cache/FILENAME.sql in /DELETED/DELTED/public_html/includes/classes/cache.php on line 59


    Line 59 reads:
    PHP Code:
    if (filemtime(DIR_FS_SQL_CACHE '/' $zp_cache_name '.sql') > (time() - $zf_cachetime)) { 
    Not exactly sure what caused this but it was a show stopper since our customer couldn't add to cart. The screen just hangs.

    I rebooted mysql server and everything is working fine again. Wanted to post just in case something is obvious that might be wrong with line 59.

    Thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Cache Error

    "stat failed" means the server's filesystem refused to disclose information about the file to the script which was asking for it.
    Thus, when filemtime() attempted to check the file's timestam, it threw that error.

    Possible workarounds:
    a) work with your hosting company to fix the permissions problems preventing it from working
    b) change your caching method to 'database' or blank instead of 'file'
    .

    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.

  3. #3
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Cache Error

    Quote Originally Posted by DrByte View Post
    "stat failed" means the server's filesystem refused to disclose information about the file to the script which was asking for it.
    Thus, when filemtime() attempted to check the file's timestam, it threw that error.

    Possible workarounds:
    a) work with your hosting company to fix the permissions problems preventing it from working
    b) change your caching method to 'database' or blank instead of 'file'
    Thanks DrByte for the prompt response. I trying to read in the FAQ about the different cache methods file, database, blank and wasn't able to find enough information.

    Can you either explain or point me to where I can find out which option is best.

    Why would I use database versus file or none.

    We have a lot of products on our site as well categories, is one setting better than the other?

    Thanks!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Cache Error

    The SQL caching affected by this ONLY affects your admin configuration switches. Thus, disabling that caching will typically cause almost no noticeable effect.

    You can make the change in your configure.php files.
    .

    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.

  5. #5
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Cache Error

    Thanks! In our case it seems like the database option might be the happy medium. When I set it to "none" the query on product page almost double and the query time increase a little bit. Storing it in database reduces parse time but queries and query time went up a bit.

    For now I am going to leave it set as "database" and observe to see how things play out.

  6. #6
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Cache Error

    DrByte, thought I did post this for you to set me straight again :)

    This is the latest error I received:
    [28-Apr-2010 16:06:52] PHP Warning: require(includes/index_filters/default) [function.require]: failed to open stream: No such file or directory in /*/*/public_html/includes/modules/pages/index/header_php.php on line 49
    [28-Apr-2010 16:06:52] PHP Fatal error: require() [function.require]: Failed opening required 'includes/index_filters/default' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /*/*/public_html/includes/modules/pages/index/header_php.php on line 49
    Line 49 reads:
    PHP Code:
    require(DIR_WS_INCLUDES zen_get_index_filters_directory($typefilter '_filter.php')); 
    Is this another one of those permission issue and if so what permission is needed?

    Thanks!

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Cache Error

    No, that's a bad product type set in your products. Completely unrelated.
    .

    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.

  8. #8
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Cache Error

    Quote Originally Posted by DrByte View Post
    No, that's a bad product type set in your products. Completely unrelated.
    Say what? You're funny DrByte! Like I am really going to know what that means. Are you saying is possible to have a single product with wrong product_type? How would I even start to find which product it might be out of 15,000+ products?

    DrByte, this is your fault, now I see everything wrong on our site because of the cool error logging introduced in 1.3.9a of course you know I love this tool.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Cache Error

    What files do you have in your /includes/index_filters/ folder?
    And are there any subfolders? if so, what's in those?
    .

    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.

  10. #10
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Cache Error

    Quote Originally Posted by DrByte View Post
    What files do you have in your /includes/index_filters/ folder?
    And are there any subfolders? if so, what's in those?
    I have the following 3 files:
      1. record_company_filter.php
      2. music_genre_filter.php
      3. default_filter.php

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Simple Cache vs. Query Cache vs. Magneticone Performance Mod?
    By NBordeau in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 May 2010, 03:55 PM
  2. Replies: 4
    Last Post: 13 Sep 2008, 04:40 AM
  3. Replies: 1
    Last Post: 26 Jun 2007, 05:06 PM
  4. Cache-Error Messages
    By hbrecht in forum General Questions
    Replies: 3
    Last Post: 14 Mar 2007, 11:50 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