I'm 100% this is user error on my part.
I'm using the focuslab master config set up to run locally, staging and live. The site works correctly on live and locally but staging I keep getting a database error.
Unable to connect to your database server using the provided settings.
Filename: core/EE_Config.php
Line Number: 207
After looking at this thread I added exit('here');
to config.stage.php but nothing happened. I've tested the database credentials in another script and the connections are working there. Am quite lost.
my config.env.php file has the following:
switch (strtolower($_SERVER['HTTP_HOST'])) {
case 'domain.ca' :
define('ENV', 'prod');
define('ENV_FULL', 'Production');
define('ENV_DEBUG', FALSE);
break;
case 'domaindev.com' :
define('ENV', 'stage');
define('ENV_FULL', 'Staging');
define('ENV_DEBUG', FALSE);
break;
case 'localdomain.dev' :
define('ENV', 'local');
define('ENV_FULL', 'Local');
define('ENV_DEBUG', TRUE);
break;
default :
define('ENV', 'local');
define('ENV_FULL', 'Local');
define('ENV_DEBUG', TRUE);
break;
The live site is at domain.com and staging is at subdomain.mysite.com
I can see the working site locally and on live (just deployed the master branch to live and to staging), but getting the database error on staging.
Please advise