Re: real time output from log file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
On Mon, April 17, 2006 11:45 am, Jason Gerfen wrote:

Anyone use php to tail a log file for patterns and perhaps updating a
iframe or something similar?  If so do you have a link to some
resources
on it?


No, but I don't see how you could make this much more complicated than:

<html>
  <head><meta http-equiv="refresh" url="0;httpd_error_log_tail.php"
/></head>
  <body bgcolor="#ffffff">
    <?php
      exec("tail /var/log/httpd/error_log", $output, $error);
      echo nl2br(htmlentities(implode("", $output)));
      if ($error) echo "<hr /><b>OS Error: $error</b>\n";
    ?>
  </body>
</html>

But maybe I'm just too much a K.I.S.S. kind of guy...

which has nothing to do with the Oprah show about sex-addicts I
just half-watched. :-)


Though why one wouldn't juse use SSH to do this in the first place is
beyond me...

I second that.


But they had guys at an old job that did this, after I turned OFF
display_output on their production server...  [shudder]

I guess Richard's had another long day ... display_output? maybe
display_errors? or was the stuff those guys produced so bad that a
blank page was preferable? ;-)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux