[Vtigercrm-developers] Handling "[2006]MySQL server has gone away" error?

Alan Lord alanslists at gmail.com
Fri Nov 14 14:35:26 GMT 2014


On 14/11/14 12:55, Alan Lord wrote:
>
> Is there a way I can test for a "good" $db object and if it doesn't have
> a connection close it and get a new one?
>

What is this function (in PearDatabase.php) supposed to do exactly?


>     function checkConnection(){
> 		global $log;
>
> 		if(!isset($this->database)) {
> 		    $this->println("TRANS creating new connection");
> 		    $this->connect(false);
> 		} else {
> 		    //$this->println("checkconnect using old connection");
> 		}
>     }


Al


> Thanks
>
> Al
>
> _______________________________________________
> http://www.vtiger.com/
>




More information about the vtigercrm-developers mailing list