Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Cache & SQL Files

    Hi
    I've searched in forums & FAQs etc - so apologies if I missed the answer....
    ....but just trying to get an understanding on the SQL files in /cache.

    I did a backup of my files via ftp today, and encountered an error when one of these files 'failed to open' - so not having any idea what that file 'does' I'm not sure if that's a problem?

    Also - I found this in the FAQ 'securing my site' area:

    /cache
    This is used to cache session and database information. The BEST security protection for this is to move it to a folder "above" the public_html/htdocs/www area, so that it's not accessible via a browser. (Requires changes to DIR_FS_SQL_CACHE setting in configure.php files as well as Admin > Configuration > Sessions > Session Directory.
    I'm not quite sure what 'above the public area' means, or the php file change.

    Also - what is the recommendation for clearing cache etc?

    Many thanks
    (the more I learn, the more I realize that I don't know )
    Last edited by Green333; 18 Mar 2010 at 07:34 AM. Reason: another question

  2. #2
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: Cache & SQL Files

    Quote Originally Posted by Green333 View Post
    /cache
    This is used to cache session and database information. The BEST security protection for this is to move it to a folder "above" the public_html/htdocs/www area, so that it's not accessible via a browser. (Requires changes to DIR_FS_SQL_CACHE setting in configure.php files as well as Admin > Configuration > Sessions > Session Directory.
    I'm not quite sure what 'above the public area' means, or the php file change.
    if i am right, it means moving the cache folder to an area not accessable by the public..

    for example public_html/htdocs/www is where all the ZC files and folders are stored so the cache folder address is

    root/public_html/htdocs/www/cache

    you can move this cache folder to
    root/cache/public_html/htdocs/www

    so long as you change the right settings in the php files it will work.

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

    Default Re: Cache & SQL Files

    Quote Originally Posted by Green333 View Post
    ... trying to get an understanding on the SQL files in /cache.

    I did a backup of my files via ftp today, and encountered an error when one of these files 'failed to open' - so not having any idea what that file 'does' I'm not sure if that's a problem?

    ...

    Also - what is the recommendation for clearing cache etc?
    You obviously have your configure.php files set to cache to file.
    As such, you'll see several *.sql files in your cache folder. In a perfect world those would be cleaned up automatically, but sadly that doesn't always happen.

    You're free to delete any that are older than "today" (current date).

    If you can't delete a particular file then it's likely in-use, which probably suggests it's one of "today"s files.
    Or maybe your webserver permissions or ownership are preventing you from accessing certain files. Your hosting company could help you sort out that kind of problem.
    .

    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
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Re: Cache & SQL Files

    Thanks mcshane78 & DrByte for the clarification

    I'll look at moving the cache folder (I would be interested to hear if this something most people have done?)

    And also - DrByte
    You obviously have your configure.php files set to cache to file.
    Is this not a normal setting?

    Many thanks again

  5. #5
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: Cache & SQL Files

    well i have them all set to file... durring installation of a ZC site i believe the default setting is NONE, but you can change that by amending the DIR_FS_SQL_CACHE details in both config files (ADMIN/INCLUDES/configure.php) and (INCLUDES/configure.php)

    i dont know if this is also a good idea or a bad idea but i also renamed mine for example

    root/cache/public_html/htdocs/www
    is now
    root/cheese/public_html/htdocs/www

    i amended the settings in both config files and in the admin end (Admin > Configuration > Sessions > Session Directory. )
    my sites work fine and i have loads of mods installed.. no apparent conflicts but i would like Dr Bytes opinion on this cache renaming?....

    p.s nice avatar photo btw!
    Last edited by Shane78; 18 Mar 2010 at 10:25 PM.

  6. #6
    Join Date
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Re: Cache & SQL Files

    Wow - thanks for the ultra speedy reply

    GREAT info - will take that on-board. Thank you, thank you.
    Be interesting to hear DrByte's comments re the re-name change too.

    PS/ avatar pic is Molly our Golden Retriever pup (she's under the illusion she's human!)

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

    Default Re: Cache & SQL Files

    Quote Originally Posted by Green333 View Post
    I'll look at moving the cache folder (I would be interested to hear if this something most people have done?)
    That's not specifically necessary for the purposes of resolving the issues you initially posted about.
    You *can* do it if you want the security benefits it offers, as described in the FAQ article you posted from.
    Quote Originally Posted by Green333 View Post
    And also - DrByte
    You obviously have your configure.php files set to cache to file.
    Is this not a normal setting?
    Setting them to "file" is fine if that's what you want for your server. The side-effect of doing so is the sometimes-leftover-files that don't get automatically cleaned up.
    But there's nothing wrong with using "file". It's obviously working for you.
    .

    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
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: Cache & SQL Files

    haha, she looks lovely...

    my pal has a black lab, only 6 months old and leaving havana cigars all over his garden...


    DrByte, what about renaming the cache folder?
    good idea or pointless or problematic?

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

    Default Re: Cache & SQL Files

    Quote Originally Posted by mcshane78 View Post
    DrByte, what about renaming the cache folder?
    good idea or pointless or problematic?
    knock yourself out
    .

    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. v154 SQL Cache Method
    By jolliejollie in forum Installing on a Windows Server
    Replies: 1
    Last Post: 27 Mar 2015, 08:57 AM
  2. sql cache method
    By buildingblocks in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 29 Jun 2010, 02:32 AM
  3. sql cache method
    By gsdcypher in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2008, 06:30 AM
  4. Replies: 1
    Last Post: 26 Jun 2007, 05:06 PM
  5. SQL Cache Method
    By kimhuff in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 21 Oct 2006, 11:52 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