Since you implemented one click update it never worked for me. The update correctly downloads the package, unpacks it, installs it and then fails. DBconfig.php file is not updated with database parameters. However, when I do the manual update, the wizard displays a warning that the database parameters must be updated. Once this is done, the wizard completes the update without any problems. It happened again during the update from 5.1.3 to 5.2.2.
Is there a file that the updater reads to get the database parameters? What am I missing?
I am not changing anything before the one-click update. One-click update does its thing and fails at the last step with an error that the data base parameters are not correct. By checking files I noticed that it doesn’t update \system\ee\EllisLab\ExpressionEngine\Service\Database\DBConfig.php. Hostname, username, password and database are set to default. To recover, I have to delete the updater folder and run the update manually by copying system/ee and themes/ee. Then I run the wizard which fails again but this time updating DBConfig.php with correct parameters is enough. Clearly, at some point my database parameters get lost. I would assume that the update process should save DbConfig.php somewhere, do its thing and restore database parameters from the saved file. This is not happening or I am missing something. Maybe I am supposed to save database parameters in another place. BTW, this happened during every update 5.0.2 to 5.1.3 to 5.2.2. To make things worst, the manual update turns the site offline. I didn’t know that and learned it from customers inquiring about the site not working.
It shouldn’t be overwriting the database config settings at all- the update shouldn’t touch system/user/ which is where the database settings should be (system/user/config/config.php).
If you just immediately do a manual upgrade, it works the first time without the database settings needing to be reset? And the settings are in the standard system/user/config/config.php file- no includes or anything odd there?
that’s odd. system/user/config/config.php doesn’t have this information. It’s commented $config[‘dynamic_tracking_disabling’] = ”; // ‘hostname’ => ‘xxxx’,
$config[‘share_analytics’] = ‘y’; // ‘username’ => ‘xxxx’,
$config[‘show_ee_news’] = ‘y’; // ‘password’ => ‘xxxx’, // ‘database’ => ‘xxxx’, // ‘dbcollat’ => ‘xxxx’, // ), //);
I don’t recall ever editing this file.
system/user/config/database.php has the correct information but it is not used.
$db[‘expressionengine’][‘hostname’] = “xxxx”; $db[‘expressionengine’][‘username’] = “xxxx”; $db[‘expressionengine’][‘password’] = “xxxx”; $db[‘expressionengine’][‘database’] = “xxxx”;
During the manual update, I have to manually update system\ee\EllisLab\ExpressionEngine\Service\Database\DBConfig.php
AHA- that’s the problem. You should never edit anything in the system/ee/ folder- it can all be replaced by upgrades. Anything you change or add goes in system/user/.
So- try adding the database config values in system/config/config.php. Make sure everything in system/ee is ‘clean’ - i.e. remove your edits.
My config on my local install db config on a 5.2 install looks like:
$config['database'] = array(
'expressionengine' => array(
'hostname' => 'localhost',
'database' => 'exp5',
'username' => 'root',
'password' => 'root',
'dbprefix' => 'exp_',
'char_set' => 'utf8mb4',
'dbcollat' => 'utf8mb4_unicode_ci',
'port' => ''
),
);
//$config['codemirror_height'] = '200em';
Just switch in your correct values and let’s see if the site still works. If it does, then I think there’s a good chance this solves the update issue.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.