Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Moving the cache folder.

Moving the cache folder.

Locked

Started by stevenb on 23 Jun 2007, 8:16 PM · Views: 2,755

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
23 Jun 2007, 8:16 PM
#1
stevenb avatar

stevenb

New Zenner

Join Date:
Mar 2007
Posts:
57
Plugin Contributions:
0

Moving the cache folder.

HI all,

I have been searching for this scenario but have been unable to find it, sorry if its already been addressed.

I have a live site and wish to move the directory above the public files, but all of the information I can find recomend a re-install.

Would it work if I where to copy the directory to the new loaction, edit the configure.php file, change the session directory setting in admin, then delete the old cache folder?

Also I may be wrong but it seems that during install I was asked if I wanted to write to the page or the database. I chose database, so is moving the cache folder a moot point?

Thanks for any help,

Steve

Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

Mods: Login Box v 1.41

23 Jun 2007, 8:43 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Moving the cache folder.

Your cche folder should be "null" in this case but I would move it anyway....

Zen-Venom Get Bitten

23 Jun 2007, 8:46 PM
#3
stevenb avatar

stevenb

New Zenner

Join Date:
Mar 2007
Posts:
57
Plugin Contributions:
0

Re: Moving the cache folder.

Thanks for the response kobra.

Do you see any problems with moving the folder as I describe?

Steve

Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

Mods: Login Box v 1.41

23 Jun 2007, 9:01 PM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Moving the cache folder.

move the cache folder above public_html

then in the config files you can just remove /public_html fro the path

/home/username/cache

works like a charm,

Zen cart PCI compliant Hosting

23 Jun 2007, 9:04 PM
#5
stevenb avatar

stevenb

New Zenner

Join Date:
Mar 2007
Posts:
57
Plugin Contributions:
0

Re: Moving the cache folder.

Thanks Merlin,

Will try it now and report back.

Steve

Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

Mods: Login Box v 1.41

23 Jun 2007, 9:37 PM
#6
stevenb avatar

stevenb

New Zenner

Join Date:
Mar 2007
Posts:
57
Plugin Contributions:
0

Re: Moving the cache folder.

Merlin,

Works like a charm as you said. :D

Thanks,

Steve

Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

Mods: Login Box v 1.41

7 Jul 2007, 7:35 PM
#7
busymom avatar

busymom

New Zenner

Join Date:
Jul 2007
Posts:
61
Plugin Contributions:
0

Re: Moving the cache folder.

Just revisiting this activity myself and needed clarification on a few things.

  1. I also selected to put it into the database during the install, is this the most secure of the choices?

  2. After I do move the cache above the public_html (or whatever my host calls it), do I need to change the DIR_FS_SQL_CACHE path in both configure.php files (in includes and admin/includes)?

  3. When you say to "move" the cache directory up above public access, am I just creating a blank directory as a place holder (since I have database cache selected) or should I actually move the one in the ZenCart hierarchy so that the .htaccess and index.php remain intact in their new location? Are there changes I need to make to these new files because of their new location?

Thanks, Karen

8 Jul 2007, 3:27 AM
#8
stevenb avatar

stevenb

New Zenner

Join Date:
Mar 2007
Posts:
57
Plugin Contributions:
0

Re: Moving the cache folder.

Hi Karen,

As for the most secure way I couldn't say - I'm a newb myself.

For # 2 - Yes change both

For #3 - Copt the cache folder above the public directory and delete the old folder. Don't create a new folder to place it in, you're simply moving it.

BTW - I'm not sure but it does still seem like a moot point.

Hope it helps,

Steve

Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

Mods: Login Box v 1.41

14 Jul 2007, 12:42 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Moving the cache folder.

It's best to still "keep" the cache folder, because it's not only sql query-caching that uses that folder. The PHP session system also stores its cache there. Thus, deleting the folder entirely is not advisable.

Simply moving it by drag-and-drop with your FTP software, and then updating the 2 configure.php files and the Sessions Directory via the admin ... should be sufficient.
Alternatively, deleting the old one, creating a new one, and making the new one read-write ... is effectively the same as drag-and-drop in FTP.

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