Redirect Incase of mySQL problem
This modification is in the archives.
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 Code:
if (!$this->link_id) { $this->halt('Link-ID == false, connect failed'); return false; } Code:
// Redirect For SQL Server Down if (!$this->link_id) { $url = 'http://narutotalk.org/'; header ("Location: $url"); } Just replace the url with where ever you want it to goto. I'm leaving the original file availible to download as it might be useful for other administrative purposes. Download This modification is archived and cannot be downloaded. |
Similar Mods
PhotoPlog 1337 Thumbs (Just incase basic templates bore you.) | vBulletin 3.5 Add-ons |