CodeIgniter Forums
Severity: error --> Exception: Call to a member function quote() ... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Severity: error --> Exception: Call to a member function quote() ... (/showthread.php?tid=72702)



Severity: error --> Exception: Call to a member function quote() ... - imabot - 01-28-2019

I sometime get the following error in the CodeIgniter error log files :


Code:
ERROR - 2019-01-21 01:12:35 --> Unable to connect to the database
ERROR - 2019-01-21 01:12:36 --> Severity: error --> Exception: Call to a member function quote() on boolean mysite/system/database/drivers/pdo/pdo_driver.php 234


It rarely happens, but happens sometimes. I guess that if the PDO driver can't connect to the database, there is no retry. So the page will display an error.


I reported a bug : https://github.com/bcit-ci/CodeIgniter/issues/5682

But apparently, this is not a bug... Any idea ?


RE: Severity: error --> Exception: Call to a member function quote() ... - php_rocs - 01-28-2019

@imabot,

This is definitely not a CI issue.

Database type?MySQL? How often does this happen? How do you connect to the database (localhost or by DSN)? Have you researched to determine if this is a common issue? PHP PDO version?


RE: Severity: error --> Exception: Call to a member function quote() ... - imabot - 01-30-2019

(01-28-2019, 09:29 AM)php_rocs Wrote: @imabot,

This is definitely not a CI issue.

Database type?MySQL? How often does this happen?  How do you connect to the database (localhost or by DSN)?  Have you researched to determine if this is a common issue?  PHP PDO version?

Database is MySQL. It happens about 1 times on 10,000. I'm using PDO to connect to the database, conventional CI PDO drivers.

Of course, I already made some researches about this error, but I didn't find any useful answers or even explanations. 

I bet that I'm not he only user affected by this problem, but probably that the others do not know it because, they don't check error log files ...