Page 1 of 1
What does this error mean?
Posted: Tue Jun 07, 2005 7:01 pm
by spardose
hI, I've just encountered the following error on a testserver
Warning: mysql_pconnect() has been disabled for security reasons in /web/www/frac/users/freewarewiese/lib/adodb/drivers/adodb-mysql.inc.php on line 355
Warning: Smarty error: unable to read resource: "db:-1" in /web/www/frac/users/freewarewiese/lib/smarty/Smarty.class.php on line 1088
What does it exactly mean?
It just happened suddenly, one minute the page loaded fine and the next...
Re: What does this error mean?
Posted: Tue Jun 07, 2005 7:12 pm
by nils73
spardose,
seems to me like MySQL database is not available or temporarily not reachable. This has already been covered in
this thread. Check your database settings and/or the connection to the database.
Regards,
Nils
Re: What does this error mean?
Posted: Wed Jun 08, 2005 2:45 pm
by spardose
Thank you for making me aware of this. The root of the error was that the hoster closed down mysql p_connect. Therefore the cms could not connect anymore.
by changing all p_connects in /root/lib/adodb/drivers/adodb-mysql.inc.php into regular mysql_connects it worked. Until now it did not give me any complications and I hope it stays that way.
Re: What does this error mean?
Posted: Wed Jun 08, 2005 3:50 pm
by Ted
If you're using one of the 0.10 betas, you can just change use_presistant to false to achieve the same thing. In 0.9.2, just change the one PConnect to Connect in include.php.
But that works too.

Re: What does this error mean?
Posted: Thu Jun 16, 2005 12:12 am
by iNSiPiD
wishy, do you mean line 313 in adodb.inc.php?
var $_isPersistentConnection = false;
Mine is already set to false and I'm still getting the Smarty.class.php error in line 1088 when I try to access the CMS.
The actual error is:
Warning: Smarty error: unabl;e to read resource: "db:admin" in .../Smarty.class.php on line 1088
Any ideas? This was working just fine last time I logged in and now I can't get access at all. The site itself is still functioning though so obviously the mySQL database is accessible.
Re: What does this error mean?
Posted: Thu Jun 16, 2005 12:25 am
by iNSiPiD
I notice that include.php seems to check for possible persistent connection and if not then it just does a normal connect. I still don't understand how this problem could suddenly occur when everything was fine before.
99 if (isset($config['persistent_db_conn']) && $config['persistent_db_conn'] == true)
100 {
101 $db->PConnect($config["db_hostname"],$config["db_username"],$config["db_password"],$config["db_name"]);
102 }
103 else
104 {
105 $db->Connect($config["db_hostname"],$config["db_username"],$config["db_password"],$config["db_name"]);
106 }
Re: What does this error mean?
Posted: Mon Jul 18, 2005 12:04 am
by iNSiPiD
It's happened again. Site up Friday, site down Monday. My ISP performed advertised software patches on Saturday so I have little doubt it was caused by anythig else.
The question is why? And should such a simple thing take out an entire site?
I noticed my config file had also been zapped. It was completely empty.
I added
Code: Select all
$config['persistent_db_conn'] = false
to my config file but it had no effect.
Is this just a preference for how to connect to the DB? Is there a way to safeguard it?
Just thinking out loud.
[In the meantime I'm off to berate my ISP.]
Re: What does this error mean?
Posted: Mon Jul 18, 2005 12:50 am
by Ted
They're at least backing stuff up, right? If not, you need to start shopping around.
It's just a preference. If it's not there, it will use a persistent connection instead.