Cannot access my website. It says "Fatal error: Call to a member function query() on a non-object in"

Permalink
So, I wake up this morning with this error when I try to access my website:

Fatal error: Call to a member function query() on a non-object in /home/ojqofbhd/public_html/updates/concrete5.6.3.4/concrete/core/models/package.php on line 66


I tried all the log in urls I found on the web to resolve this issue to no avail.

I also tried to go via Softtaculous (cPanel) and it told me my website needed an update, so I click on that, a bar fills up and it tells me that in order to complete the update, I have to log in to my admin site, which I cannot access. How can I resolve this issue? Thanks in advance.

I had previously updated concrete5 two weeks ago if that helps.

 
narcosislabs replied on at Permalink Reply
I'm having the same issue. Updated to Concrete5.6.3.4 (planning to continue to the current version today) but when I tried to access the access the website admin panel I got the same message as Axelph. Same message when I try to just load the website via browser.

Fatal error: Call to a member function query() on a non-object in /home/jpino/narcosislabs.com/public_html/updates/concrete5.6.3.4/concrete/core/models/package.php on line 66

Thank you for any help.
pixo replied on at Permalink Reply
pixo
Did you ever find a resolution to this issue? The same error popped up for me today.
andrewjaff replied on at Permalink Best Answer Reply
andrewjaff
Hi

Please check your database connection .
pixo replied on at Permalink Reply
pixo
The database was the issue. Host was having a problem.
andrewjaff replied on at Permalink Reply
andrewjaff
Hi Jamie,

Can you mark best answer. :)

Thanks
Andrew Jaff
pixo replied on at Permalink Reply
pixo
I don't see a best answer links. Where did that go?
narcosislabs replied on at Permalink Reply
It was the config file. It was pointing at the wrong server. Everything works now.
Axelph replied on at Permalink Reply
I still have problems. As of now, I can't log in.
mohammedfaqruddin replied on at Permalink Reply
mohammedfaqruddin
I think you may have deleted an installed package folder. Try uploading the package back to the package folder.
Axelph replied on at Permalink Reply
No. To be honest, I don't even know how to access the source code.
andrewjaff replied on at Permalink Reply
andrewjaff
Hi ,

Please go to config file if you are using 5.6 or database file if using 5.7
and check your db connection.

Or drop me mail if you need some technical help.
On May 14, 2016 4:42 PM, "concrete5 Community" <discussions@concretecms.com>
wrote:
meswaramarco replied on at Permalink Reply
2016 Update - I had a similar error message ;

PHP Fatal error: Call to a member function query() on a non-object in /home/testsite/public_html/concrete/core/models/package.php on line 66


Turns out the mysql connection credentials were wrong in /config/site.php. Somehow there was a fullstop after the database name.

Cleared that fullstop - website visible !