Version: 1.00, by Harley77
Developer Last Online: Jan 2011
Version: 3.0.7
Rating:
Released: 03-17-2005
Last Update: Never
Installs: 16
No support by the author.
If someone has posted something like this before, I couldn't find it.
What this does:
It will redirect visitors to a static webpage of your choosing incase a connection to the mySQL server could not be established.
Every so often, The SQL server of our host becomes unresponsive, usually only for a few minutes, but, it's still annoying to try and load the site and have it take forver then be finally be greeted with a lovely SQL error. So, now people can get a nice friendly error page instead.
Feel free to modify and mess with it however you choose.
UPDATED
Trigunflame has provided a more elegant, sitewide solution that effectivly does the same exact thing.
Installation:
1. open includes/db_mysql.php
2. find the code below in the connect() function
His, Just wasn't sure what all errors it covered. I know that the method I put up pretty much covered all the bases incase of any kind of issue, just wasn't sure if the same was true with Trigunflames.
Well.. your covered just the index.php page, as well as deaths; which would be pointless if someone was browsing a forum/thread/post.
Not only that.. its issuing a second connection attempt, effectively doubling your total mysql connections...
The small lil mod I posted however, deals with it at the connection source inside of db_mysql. Thus every page, regardless if a connection cannot be established you are re-directed to the target location.
Modify your main post btw with the snippet I posted for peoples future reference.
Well.. your covered just the index.php page, as well as deaths; which would be pointless if someone was browsing a forum/thread/post.
Not only that.. its issuing a second connection attempt, effectively doubling your total mysql connections...
The small lil mod I posted however, deals with it at the connection source inside of db_mysql. Thus every page, regardless if a connection cannot be established you are re-directed to the target location.
Modify your main post btw with the snippet I posted for peoples future reference.
I understand where yours and mine covered in terms of forum location, I was just asking inso far as the diffrent types of sql failures, would yours cover them all. You seemed to answer that question in your post. Thanks. I'll update this post. I have a new idea now for this little script of mine, If it turns into something useful I'll post it. Thanks again.
This looks good but how will members know theres a problem if they auto get forwarded to a new site?
Just make up a page for your site similar to this (I have a sister site (different host) that I redirect to in-case my forums' site goes down - either the sql database or the entire server): Server Down Message