0

I moved my system folder above the root and was updating the database.php file and was confused about the correct path for one of the settings.

Should it be:

$db['expressionengine']['cachedir'] = '/nfs/c10/h06/mnt/143832/domains/website.org/html/system/expressionengine/cache/db_cache/';

or

$db['expressionengine']['cachedir'] = '/nfs/c10/h06/mnt/143832/domains/website.org/system/expressionengine/cache/db_cache/';

Thanks!

0

If the root of your site is "/nfs/c10/h06/mnt/143832/domains/website.org/html/", the right option is the second one.

| improve this answer | |
  • I am just wondering if cache directory is above the root or "public html", will it be still writable? – Bhashkar Yadav Jun 11 '13 at 5:19
  • Hi, @BhashkarYadav! In all server I had permission to move the system directory above the root, the folder was writable too. And I never had to use 777. 755 for directories and 644 for files did the job. – Robson Sobral Jun 11 '13 at 10:40
  • I have a couple of additional questions. In looking through my site I do not see a folder "db_cache" at the specified path. Just ee-version, magpie_cache, and page_cache. 1. What does this line of code do? 2. Do I need to create the folder manually? – cscott Jun 17 '13 at 18:40
  • @cscott, all subfolders of cache are created by the EECMS itself. – Robson Sobral Jun 17 '13 at 19:25
1

I'd look to make it a little more dynamic (and legible) by using APPPATH:

$db['expressionengine']['cachedir'] = APPPATH."cache/db_cache/";

You still need to set 777 permissions on the cache/ directory but it will be writable when placed above the webroot.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.