Well, I've given up.
I'm now just checking which server its on (with a global variable - yuk!) based on it's URL, and determining behaviour based on that.
Thanks for your comments..
User Profile
Collapse
-
Hi Markus,
Yep - done that.
My problem isn't how to display or handle the error, but rather that it occurs in the first place.
Any other way of detecting if there is an sql service available that doesn't raise an error when it fails would be ok, too..
Thanks.Leave a comment:
-
Hi pbmods,
Agree that probably turning off all errors is not what I want..
I'm not sure if php offers a process ID hook - I can't find one. I looked in the /var/ directory, and the /var/db/ also, but couldn't see anything interesting.
I tried get_loaded_exte nsions() which "returns the names of all the modules compiled and loaded in the PHP interpreter".
That didn't help much, as mysql...Leave a comment:
-
Cannot turn off errors from @mysql_connect
Hi All,
I have a script that runs on two servers - one with SQL, and one without.
I have coded it so that it doesn't matter on which server it runs, but when I try to connect (to determine which strategy to follow) with:
...Code:function connect_to_sql_ok() { $conn = @mysql_connect($this->mysql_host, $this->mysql_user, $this->mysql_pass) or die('<hr />MySQL Error: ' .mysql_error(). '<hr />');
No activity results to display
Show More
Leave a comment: