"No connection to DB" message / Mail to admin

Author Message

Marco Zinn

Sunday 17 August 2008 10:32:40 am

Hi there,

i found out, that ez (3.10) shows a quite unuseful message (I think, it was "You don't have access to this page, please log in"), when it cannot connect to it's MySQL db.
To be precise, the DB did no allow the connection due to to many connections at that time. I can see that very nicely in ez's error log.

Why does ez not show a better message here like the famous "Can't connect to Database"?

A related question: Is there any way to send an email notification to the admin in case of severe errors? A kind of "plugin" to the error-logging would be nice. Something like "If error message contains "Database" or "XYZ", send mail to me@admin.com". I guess, this is not part of ez yet, but i also guess, somebody already has created this... im a right ;) ?

Marco
http://www.hyperroad-design.com

Maxime Thomas

Thursday 04 September 2008 12:01:33 am

Hi Marco,

You can handle the errors by overriding the error.ini file. The No connection DB is the error number 50, you may handle it to a new extension which will send emails.

Hope it helps.

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.