DB failover settings in .env file? |
Failover functionality is currently broken because we always throw an exception when there is something wrong with the connection. I prepared a fix for this: https://github.com/codeigniter4/CodeIgniter4/pull/3074 - hopefully it will be accepted soon.
One thing you have to remember when it comes do .env file. You can only override values that are already defined in the original config file - in this case in database.php, so you need to prepare empty variables in failover array. The other thing is that failover array can have multiple entries so in your .env file it should look something like this: PHP Code: database.default.failover.0.hostname = secondaryserver.com |
Messages In This Thread |
DB failover settings in .env file? - by jameslittle - 06-04-2020, 06:59 AM
RE: DB failover settings in .env file? - by dave friend - 06-04-2020, 10:55 AM
RE: DB failover settings in .env file? - by jameslittle - 06-04-2020, 06:46 PM
RE: DB failover settings in .env file? - by michalsn - 06-08-2020, 10:36 AM
RE: DB failover settings in .env file? - by jameslittle - 06-09-2020, 09:13 AM
|