0

Same Issue as Master config – blank screen

I've also been having the exact same issues. I'm trying to run the files in a folder such as webaddress.com/staging/site_name. I add this address to the environment config file, but I can't get anything other than a white screen on both the homepage and the CP login page. I have tested running the files at site root (public_html) and this works perfectly. I assume the white screens have something to do with running the site within folders (ie. path problem in the env file). I have tested this on 2 different servers with the same results. Is there any reason why I wouldn't be able to use the following path for the staging environment...

case 'webaddress.com/staging/site_name' :
    define('ENV', 'stage');
    define('ENV_FULL', 'Staging');
    define('ENV_DEBUG', FALSE);
break;

I'm completely baffled and have tried everything. Any thoughts?

3

The switch in the config.env.php is based on the $_SERVER['HTTP_HOST'] variable, which only contains the host name, not the subdirectories below it.

You'd need to do some serious reconfiguration of Master Config in order for it work with with different directories as environments, as it's designed to be using different servers for environments, such as somesite.dev, staging.somesite.com, www.somesite.com.

3
  • Thanks for the quick response. Is it possible for it to work in a subdirectory if there is an address such as staging.somesite.com pointing to it. Sorry... Not sure how this works. Feb 3 '14 at 18:29
  • 1
    Yes, if you setup a separate virtual host on your server, then it will work just fine. It really doesn't care where the files are, as long as they are accessible at the root of the domain name. Feb 3 '14 at 22:32
  • This helped me out. I was getting the white screen because I had set the case to look for subdomain.domain.com once I removed the subdomain I was fine.
    – CreateSean
    Mar 21 '14 at 22:20

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.