[wp-hackers] Personalizing db down WordPress errors
Peter Westwood
peter.westwood at ftwr.co.uk
Fri Aug 3 14:40:25 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Menard wrote:
>
> On Aug 3, 2007, at 5:17 AM, Peter Westwood wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Chetan Kunte wrote:
>>> Personalizing this "database-down" error message using the active
>>> Wordpress theme would be a better idea [and should be in the core].
>>> What do you'all think?
>>
>> If the db is down then you don't know what the active theme is ( or for
>> that matter any other of the options values).
>>
>> The best that can be done is providing a single plugin-in mechanism for
>> replacing the page e.g. is a file in wp-content called db-error.php
>> exists then include that rather than use the normal error output handler.
>
> For what it's worth I found these two articles last summer. They offer
> instructions (for the then version of WP) for hacking your WP code to
> display friendly DB error messages. We use this on some of the higher
> traffic site when requested by the client. It's some pretty simple
> steps. Just create a static file via view source from a browser and save
> to a file.
>
> http://5thirtyone.com/archives/408
> http://allforces.com/2006/06/18/custom-wordpress-errors/
>
> Westi, would like to know more about using the db-error.php file you
> mentioned. I've checked the code and don't see referenced to this file
> in any of the WP core.
>
I guess I wrote my description a bit vague. It was a description of a
way in which is could be implemented in WP rather than how it works now!
A trac ticket with implementation of something like what I described
would probably make it into the core. Anything based on current theme
etc wouldn't as the data isn't available.
sorry for the confusion.
westi
- --
Peter Westwood
http://blog.ftwr.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGsz5ZVPRdzag0AcURAnZ3AKDHXVRlh79Q8MjcbHmFuXjrvfvEswCeMDaa
g0Cs0yY8qgqLJMZB2vhZlaU=
=GaFC
-----END PGP SIGNATURE-----
More information about the wp-hackers
mailing list