We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

One click update doesn't update dbconfig.php. Update fails

News and General

spff's avatar
spff
4 posts
6 years ago
spff's avatar spff

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?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

Odd- when you update the database parameters, what are you changing? And… is it getting changed back before the next time you upgrade? If you have the exact error you get during the manual upgrade handy, let me know (without sharing anything that’s a security risk).

       
spff's avatar
spff
4 posts
6 years ago
spff's avatar spff

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.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

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?

       
spff's avatar
spff
4 posts
6 years ago
spff's avatar spff

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

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.