News:

Wondering if this will always be free?  See why free is better.

Main Menu

Preventing errors when host has problems

Started by Nic, October 31, 2004, 02:09:30 PM

Previous topic - Next topic

Nic

I'm sure this has been asked before since I swear I read it a few weeks ago, but can't seem to find the post in question, even after half an hour's searching, so I'll ask here.

My host has been having a few MySql problems recently, only intermittent, so not much to complain about, but SSI.PHP causes a load of errors on all the pages I use it on (namely just to show who is online on all the pages).  Each error basically boils down to an invalid mysql resource, and the first line is in subs.php 167 (this is RC 2) - can't remember the rest of them.  The strange thing is I have RC 1 on another site (same host), but when the database goes down it doesn't show the errors just 0,0 for those online.  I don't *think* I changed anything in the subs.php for this site, but am not sure.  I was wondering if this was possible to do (i.e. for it not to show the errors, just 0,0)?  I'm not changing hosts as they have been excellent and only been having these small glitches for a week or two, I just wanted to get rid of the error messages so that my pages don't look all weird when they happen.

Does that make any sort of sense?

[Unknown]

Just add error_reporting(E_ALL ^ E_NOTICE); to the beginning of your script.

-[Unknown]

Nic

To SSI.php, yeah?  There's a line in there that has

$ssi_error_reporting = error_reporting(isset($db_show_debug) && $db_show_debug === true ? E_ALL : E_ALL ^ E_NOTICE);

Do I remove that first?

[Unknown]


Nic


Advertisement: