Can i get email notification each time error_log added/incre

  • basketmen
  • Student
  • Student
  • basketmen
  • Posts: 68

Post 3+ Months Ago

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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

What sort of errors? CGI, Apache, mySQL?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

The log is not written via ftp. ftp just happens to be a way that you can get to it.

If you want notifications each time an error is written to the log (which is a bit insane, but ok), you'll need to write a script to read the log file and send your email whenever it changes. I'm guessing you're on a shared host, so your capability to this may or may not even exist. If you're not on a shared host, I'd suggest looking at syslog-ng as with a little BASH scripting you can set this up probably easier and more efficiently than any other method.

A lot of what goes into your error log are script kiddies trying to find common control panels, such as phpmyadmin, or an admin section to the site or similar - meaning a lot of what you'll see are 404's. The only way to stop this would be to write your httpd.conf or apache(2).conf to do something with these requests other than issue a 404, such as redirecting them elsewhere. If you're on a shared host, you have no control over this. If you're actually getting "real" errors in your error log, you should fix those problems by fixing your code and then you won't see them anymore, and if you're trying to maintain some mission critical web site, you should be looking at those logs every day anyway.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.