Error After Switching Host Servers
Permalink
I read the "moving a site" tutorial, but it still isn't working.
This is what I get...
"Unable to connect to database.
A database error occurred while processing this request.
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/content/88/9120688/html/updates/concrete5.4.2.1/concrete/models/config.php on line 48 and defined in /home/content/88/9120688/html/updates/concrete5.4.2.1/concrete/models/config.php on line 136"
(end of error)
One question... I changed my config/site.php, but the part I'm not sure about is the part after password_salt there is a bunch of gibberish... Do I keep that there, or would switching hosts change this?
The host I'm using isn't the problem itself as I run multiple other c5 sites with this provider, so I know it is fully capable of powering c5 if I can figure out all my settings!
Thanks for any suggestions and let me know if you need more info from me!
~Kari
This is what I get...
"Unable to connect to database.
A database error occurred while processing this request.
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/content/88/9120688/html/updates/concrete5.4.2.1/concrete/models/config.php on line 48 and defined in /home/content/88/9120688/html/updates/concrete5.4.2.1/concrete/models/config.php on line 136"
(end of error)
One question... I changed my config/site.php, but the part I'm not sure about is the part after password_salt there is a bunch of gibberish... Do I keep that there, or would switching hosts change this?
The host I'm using isn't the problem itself as I run multiple other c5 sites with this provider, so I know it is fully capable of powering c5 if I can figure out all my settings!
Thanks for any suggestions and let me know if you need more info from me!
~Kari
Thanks for letting me know about the password_salt thing - makes sense now.
Sometimes (even though I thought I "rechecked" everything once), it helps to have someone point out the specifics. I had actually entered all my info correctly into the site.php, but when I checked my control panel I found out that there had been an error during my database restore that I hadn't noticed before... so now I'm retrying the restore and I bet I'll be right as rain soon!
Thank you!
Sometimes (even though I thought I "rechecked" everything once), it helps to have someone point out the specifics. I had actually entered all my info correctly into the site.php, but when I checked my control panel I found out that there had been an error during my database restore that I hadn't noticed before... so now I'm retrying the restore and I bet I'll be right as rain soon!
Thank you!
- Most hosts have the database server on the same machine as the web server, 'localhost', but many have their mysql servers on another machines, so check with your host the location of your database. (DB_SERVER)
- You would have had to create a new database on your new host, and imported a dump from the previous host. You also need to create a user for this database and give that user the correct privileges to use the database. (I sometimes miss this step). So check that.
- Obviously check the username, password and database name. It's easy to get these mixed around.
You'll want to keep the same PASSWORD_SALT value from your previous install - this is used in storing the passwords for concrete5 users. Don't change it. This value however, is unrelated to you not being able to connect to the database.