ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Best cachedir for config-bootstrap

July 26, 2012 1:43pm

Subscribe [2]
  • #1 / Jul 26, 2012 1:43pm

    J. Hull

    132 posts

    I’ve recently undertook the whole Config-bootstrap/Git/Beanstalk methodology and almost have it ironed out except for one problem.

    Currently my config-bootstrap (based on others around the web) has this:

    $base_path                        = $_SERVER['DOCUMENT_ROOT'];
    $system_folder                    = "system";
    
    $db['expressionengine']['cachedir']  = $base_path . $system_folder ."/expressionengine/cache/db_cache/"

    Now unfortunately when I run this I get the white screen of death UNLESS I comment out the $db line, then all works fine within my development server (MAMP). My config and database.php’s are default (save for the single include line at the end for the config-bootstrap).

    Unfortunately when I try to deploy to my staging server, it is still trying to resolve the cachedir from my machine—not the server it is on.

    I believe the problem is that the above gives me the whole “http://domain.com/system/expressionengine/cache/db_cache/” directory when really it wants the “/public_html/system/expressionengine/cache/db/cache/” directory.

    How can I change that line of code to work both in the local environment and out in the real world?

    I notice the NSM-config uses APPPATH - is that a better solution?

    Thanks for any help!

  • #2 / Jul 26, 2012 5:17pm

    Enviromed

    375 posts

    You might want to check out:  https://ee-garage.com/nsm-config-bootstrap

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases