[TYPO3-dev] Fail-safe mechanism for database connectivity problem

Dmitry Dulepov dmitry at typo3.org
Fri Oct 6 14:17:44 CEST 2006


Hi!

(I answered to Dan privately, now posting similar thing here).

Dan Frost wrote:
> We built a system recently using PHP5's exceptions and set_error_handler
> so that you never see a database error or even a minor PHP error.
> 
> The first part is to catch all nasty PHP errors.
> 
> set_error_handler('evErrorHandle');
> 
> function evErrorHandle(...) {
>   // do what you want with the error here
> }
> 
> Then you wrap the entire index.php in:
> 
> try {
>   // normal index.php
> } catch (e) {
>   // show a pretty fail-over page here
> }
> 
> This is actually in a library which we will publish in the next few days
> or so...

The problem is that it requires PHP5 while typo3 still should work with 
PHP4.

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)




More information about the TYPO3-dev mailing list