SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can i get email notification each time error_log added/increased?

    Each time our site got error messages, is stored in a home/username/public_html/error_log file, in ftp right?

    i wonder can i get notification to email each time new error message added/increased? the response or notification is the most important, so can fixing the problem asap, and since some of us not to often accessing+checking the ftp
    Make the world better

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    bm,

    Good thought ... but the log is a special entity.

    I've made a quick check at Apache.org and they don't appear to have a mechanism for e-mailing error reports. That then falls upon the webmaster to use a custom error handler to write to the logs as well as e-mailing you. Don't worry, SitePoint's PHP Anthology book has a section on custom error handlers.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    Twitter: @TimIgoe silver trophy TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,058
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    You will need to investigate a log processing / log handling system - maybe even a simple script you write yourself that tail's the file and emails out any changes from it.

    Depending on the type of error in the log, you could potentially catch them in your code and email from within the sites code?

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    On second thought, the PHP error handler will only help PHP errors (which should have been thoroughly tested before putting online). What type of errors are you looking to be notified about? Apache errors? PHP errors? MySQL errors? I think that a cron script looking at the length of your error log (for changes) may be more realistic for you.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •