PDA

View Full Version : DB Error Notification Restrictor


Scott MacVicar
03-15-2006, 10:00 PM
While doing some dev work I was getting annoyed with my second SQL server disappearing and me getting 100 emails telling me so, now the problem was the database couldn't be connected to so I couldn't store the time the error occured.

I did think of a text file but I wanted emails for different types of errors so I decided to use SQLite, I also didn't want to have to deal with file locking and parsing.

You will need PHP 5+

You will need to do the following:

* Create a cache folder in your main vBulletin directory
* Chmod cache folder to 666
* Upload blank index.html to the cache folder
* Upload db_error_install.php to your install folder
* Run db_error_install.php
* Edit class_core.php as in the text file

If there is something like this already, apologies.

Xenon
03-16-2006, 05:56 PM
thx, will try out that one, i am annoyed of that msgs as well ^^

Scott MacVicar
03-16-2006, 06:01 PM
You can use PHP 4 too if the SQLite extension from Pecl is installed http://pecl.php.net/package/SQLite

Snake
03-16-2006, 06:05 PM
This is so useful. Thanks Scott! :)

DementedMindz
03-16-2006, 06:30 PM
thanks :)

Paul M
03-16-2006, 11:47 PM
Marco did one a few months ago which I use (file based). :)

Scott MacVicar
03-17-2006, 01:02 AM
I didn't know, apologies to Marco for producing something so similar.

COBRAws
03-17-2006, 03:55 AM
no more spam war *YAY* xD

Kihon Kata
03-17-2006, 02:49 PM
I am running 4. How can I tell if SQLite extension from Pecl is installed on my server?

Scott MacVicar
03-17-2006, 05:18 PM
Look in your phpinfo it should show it there.

Floris
03-18-2006, 01:20 AM
:thumbsup: Nice work Scott.

SaN-DeeP
03-18-2006, 08:52 PM
You can use PHP 4 too if the SQLite extension from Pecl is installed http://pecl.php.net/package/SQLite
I have php4.0 installed, i assume you meant I need the package you have specified ?

thanks for this handy addon.

dfc005
05-22-2008, 10:27 PM
Hey guys, any chance this works with vB 3.7 and that you can get it done without code changes?