Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    772
    Plugin Contributions
    0

    red flag Cache folder contains too many files to let us open it

    Hi,

    There is this cache folder in the store root. It has become so big that we could no longer get into it. Our host has solved the issue and cleared the cache. To avoid this from happening again, do we need to clear the cache regularly? Is there a way to clear the cache automatically? What about using a cron job (if yes, how do we do it)?
    Using zencart v.1.3.9e
    Website: http://www.dealbyethan.com
    Email: admin AT dealbyethan DOT com

  2. #2
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Clearing Cache

    Hi,

    It largely depends on what is filling the cache up. Is the directory called 'cache' or is it the 'bmz_cache' directory that is getting big?

    Regards,
    Christian.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Clearing Cache

    Simple: Turn off whatever logging systems are generating log files in that folder.
    .

    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.

  4. #4
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    772
    Plugin Contributions
    0

    red flag Re: Clearing Cache

    Quote Originally Posted by CJPinder View Post
    Is the directory called 'cache' or is it the 'bmz_cache' directory that is getting big?
    It is the cache folder in the store root. So what do we do?

    Quote Originally Posted by DrByte View Post
    Simple: Turn off whatever logging systems are generating log files in that folder.
    Which logging system is generating the log files in the cache folder?
    Using zencart v.1.3.9e
    Website: http://www.dealbyethan.com
    Email: admin AT dealbyethan DOT com

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Clearing Cache

    Quote Originally Posted by dealbyethan.com View Post
    Which logging system is generating the log files in the cache folder?
    That depends on the names of the log files, which you've not shared, so I can't answer that question for you.
    But the filenames will generally tell you where the logs come from.
    .

    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.

  6. #6
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    772
    Plugin Contributions
    0

    red flag Re: Clearing Cache

    Quote Originally Posted by DrByte View Post
    That depends on the names of the log files, which you've not shared, so I can't answer that question for you.
    But the filenames will generally tell you where the logs come from.
    Hi DrByte,

    One of the filenames is myDEBUG-328818-1277980XXX.log

    Any idea?
    Using zencart v.1.3.9e
    Website: http://www.dealbyethan.com
    Email: admin AT dealbyethan DOT com

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Cache folder contains too many files to let us open it

    If they are all like that, you have a problem with the site that is throwing an error.

    1.3.9 came out with automatic reporting of errors. Download and open one of the files and see if that doesn't point you in the right direction.

  8. #8
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    772
    Plugin Contributions
    0

    red flag Re: Cache folder contains too many files to let us open it

    Hi,

    Opened the latest file and the following error is repeated multiple times:

    PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: No ending delimiter '/' found in /includes/classes/template_func.php on line 30


    How do I fix this error?
    Using zencart v.1.3.9e
    Website: http://www.dealbyethan.com
    Email: admin AT dealbyethan DOT com

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Cache folder contains too many files to let us open it

    Perhaps you did not get the correct template_func.php file on upgrade or you are using an image mod of some kind.
    Lines 25 thru 35 of that file should look like the following IF it is not changed by a mod.
    PHP Code:
      function get_template_part($page_directory$template_part$file_extension '.php') {
        
    $directory_array = array();
        if (
    $dir = @dir($page_directory)) {
          while (
    $file $dir->read()) {
            if (!
    is_dir($page_directory $file)) {
              if (
    substr($filestrrpos($file'.')) == $file_extension && preg_match($template_part$file)) {
                
    $directory_array[] = $file;
              }
            }
          } 
    Don't just change the code if it's different. Find out why.
    Then.... No worries, Mate.

  10. #10
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    772
    Plugin Contributions
    0

    red flag Re: Cache folder contains too many files to let us open it

    Hi,

    Just checked the file and it has not been modified. Don't understand where the error is coming from. Any idea?
    Using zencart v.1.3.9e
    Website: http://www.dealbyethan.com
    Email: admin AT dealbyethan DOT com

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 23 Dec 2013, 06:02 AM
  2. Found many AIM_DEBUG*** files in my cache folder
    By MagicMan in forum General Questions
    Replies: 3
    Last Post: 28 Dec 2008, 09:45 PM
  3. failed to open stream: Too many open files in ???
    By IllusionGuy in forum General Questions
    Replies: 4
    Last Post: 28 Aug 2007, 09:31 PM
  4. [Help] Too many open files.. application_top.php
    By Xfire in forum General Questions
    Replies: 2
    Last Post: 6 Oct 2006, 07:47 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR