Database Error out of no where

Permalink
Here is the error I have on my site:

Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/anybi463/public_html/Ezrate.ca/updates/concrete5.4.2.1/concrete/models/config.php on line 48 and defined in /home/anybi463/public_html/Ezrate.ca/updates/concrete5.4.2.1/concrete/models/config.php on line 136

I haven't touched the files at all can anyone help me out?

Thanks

 
mkly replied on at Permalink Reply
mkly
Is it possible that there is an issue with your database?

Did you change the password or location of it?

Or possibly something with /config/site.php? Although you have said you haven't touched anything, so I would place my guess on the database.
merge replied on at Permalink Reply
It is actually a clients site that I built and he doesn't touch the website outside of c5. My initial response was that it could be a database error but when he contacted his host they denied and said it was a php error. It seems to be a php error from the error message but I'm not sure what it actually is.

Thanks for your response
mkly replied on at Permalink Reply
mkly
The reason I asked is because the ConfigStore constructor calls Loader::db() to get it's instance of Database. This is a static method call and seems to mean that Loader::db() is not returning a Database object.

Loader::db() checks a few things but basically it looks like it tries to get $server passed in or instead checks DB_SERVER which is defined in /config/site.php which would lead me to believe that DB_SERVER is not being defined in /config/site.php

This could be because the file does not exist. That the server does not have permissions to it. That it is not defined in site.php or probably something I don't know about. You might want to check the permissions of /config/site.php and then verify that DB_SERVER is set to an address just in case.
merge replied on at Permalink Reply
Thanks! I'll try this out and report back.
JohntheFish replied on at Permalink Reply
JohntheFish
This is a stab in the dark. Maybe the host has changed the environment slightly, such as a change to php version or library? (I had an issue a few weeks back where a site host did a server upgrade that changed a perl library module; not a C5 site, but I had to do some fast work to get it live again)
wrendell replied on at Permalink Reply
did you ever find a solution?