I have recently set up an ExpressionEngine 'Sandbox' test site locally via MAMP (On Mac OSX), and have integrated the Focus Lab LLC’s EE Master Config for when I push the local Sandbox site code to a staging server (using version control via Git/Tower/Beanstalk etc).

I have set up all the configurations as required using the documentation for Focus Lab LLC’s EE Master Config.

The issue:

When I naivgate to the local MAMP Sandbox site URL: ie. http://localhost:8888/sandbox/

I get the following server error message(s):

Warning: require(/Users/karlbowers/Sites/../config/config.master.php): failed to open stream: No such file or directory in /Users/karlbowers/Sites/Sandbox/system/expressionengine/config/config.php on line 410

Fatal error: require(): Failed opening required '/Users/karlbowers/Sites/../config/config.master.php' (include_path='.:/Applications/MAMP/bin/php/php5.5.10/lib/php') in /Users/karlbowers/Sites/Sandbox/system/expressionengine/config/config.php on line 410

I have placed the new 'config' folder at the same level as the 'system' folder.





I have added the following into my master config file:

if ( ! defined('ENV'))
    switch (strtolower($_SERVER['HTTP_HOST'])) {

        case 'sandbox.domainname.co.uk' :
            define('ENV', 'stage');
            define('ENV_FULL', 'Staging');
            define('ENV_DEBUG', FALSE);

        case 'localhost:8888/sandbox' :
            define('ENV', 'dev');
            define('ENV_FULL', 'Development');
            define('ENV_DEBUG', TRUE);

        default :
            define('ENV', 'local');
            define('ENV_FULL', 'Local');
            define('ENV_DEBUG', TRUE);

I'm not sure why I am getting the errors stated above? It's like the URL paths are incorrect?

Anyone have any ideas on this?

Many thanks in advance.




It looks like you're running the system below webroot, which is not how the FocusLab master config is setup to run by default. From the readme:

The instructions above are for setting up the config above webroot (your "public_html, "htdocs", etc directory).

So it assumes this structure:


If you really need to run your system folder below webroot, see this answer - specifically, you need to change the include paths in /config/config.master.php and /system/expressionegine/config.php.

  • Hi Derek, (apologies for the long delayed response!). As per your suggestion (and Focuslab Docs) I have tried moving the 'config' & 'system' folder above root as suggested but it still does not seem to work? I tried this on both the local MAMP server and on my staging server set up. Any ideas what could be the problem here? – Karl Bowers Apr 11 '14 at 14:38

Your switch/case statement is checking against $_SERVER['HTTP_HOST'] - so for your localhost, this would be localhost, not localhost/folder-name.

Typically, with this kind of setup, "development" and/or "staging" would be referring to a remote server - your localhost should instead fall under the final default case for local environments. This allows you to use either "localhost" or a named vhost (eg, "http://project.dev").

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.