I'm having some trouble: I have an MSM-site, on both staging- and live-servers. I'm developing the secondary site, and have just moved to the live-server. Weird thing is it cannot connect to db. My bootstrapped config has this if-statement:
if($_SERVER['HTTP_HOST'] == 'www.domain.com' || $_SERVER['HTTP_HOST'] == 'en.domain.com')
This doesn't seem to evaluate properly, because ExpressionEngine can't load site preferences. So to test I've created a simple php file on the subdomain which just echoes $_SERVER['HTTP_HOST']
, and that outputs en.domain.com. So why would this evaluate properly in vanille PHP but not in ExpressionEngine? Any thoughts?
Ok we found the problem. Apparently this server wasn't too happy about the use of ||
(double pipe) as OR, so we put it in its own separate elseif statement and now its working.
Whenever I have an issue like this, I put a die('Conig File'); to make sure that the config file is getting processed. You will obviously notice if the config file is being read or not. Once you can verify that it is being read, then you can move to figuring out why its not being processed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With