Page 1 of 1

Fatal error: Call to a member function query on a non-object

Posted: Sat Jun 01, 2013 9:15 am
by hrdedicated
Error code :

Content-type: text/html

Fatal error: Call to a member function query() on a
non-object in
/home/username/public_html/adserver/lib/pear/DB/DataObject.php
on line 2365

Error code:
Fatal Error
Script Error
Cannot connect to MySQL: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

+++++++++++++++++++++++++++++++++++++++++++++++++++

Content-type: text/html

Fatal error: Call to a member function query() on a
non-object in
/home/username/public_html/adserver/lib/pear/DB/DataObject.php
on line 2365


Solution

This is a sign of the service MySQL failing, goahead and upgrade your mysql version to most stable version :

If you have cpanel on server try this

root@server01[~]#/scripts/mysqlup --force

Else you can upgrade it using yum

root@server01[~]#yum upgrade mysql

Thank you.