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!