What does this error mean?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
spardose

What does this error mean?

Post 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...
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: What does this error mean?

Post 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
spardose

Re: What does this error mean?

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: What does this error mean?

Post 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.  :)
iNSiPiD

Re: What does this error mean?

Post 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.
iNSiPiD

Re: What does this error mean?

Post 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   }
iNSiPiD

Re: What does this error mean?

Post 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.]
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: What does this error mean?

Post 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.
Locked

Return to “CMSMS Core”