RE: [PHP] Tailing a log file {!?}
| From: | .ben | Date: | Sun, 05 May 2002 23:38:22 +0000 |
| Subject: | RE: [PHP] Tailing a log file {!?} | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96195@lists.php.net to get a copy of this message | ||
Is there a tail util for NT/W2K?
.b
> -----Original Message-----
> From: Dave Raven [mailto:dave@raven.za.net]
> Sent: 05 May 2002 10:33
> To: Liam MacKenzie; php-general@lists.php.net; Tom Rogers
> Subject: Re: [PHP] Tailing a log file {!?}
>
>
> check directory rights.
>
> If need be, passwd the user and give it a shell.
> then try on the console as the webserver user
> to tail the file.
>
> ----- Original Message -----
> From: "Liam MacKenzie" <phplist@operationenigma.com>
> To: <php-general@lists.php.net>; "Tom Rogers" <trogers@kwikin.com>
> Sent: Saturday, May 04, 2002 11:26 AM
> Subject: Re: [PHP] Tailing a log file {!?}
>
>
> > That doesn't work either!
> > Something's going on here...
> >
> >
> >
> > ----- Original Message -----
> > From: "Tom Rogers" <trogers@kwikin.com>
> > To: "Liam MacKenzie" <phplist@operationenigma.com>;
> > <php-general@lists.php.net>
> > Sent: Sunday, May 05, 2002 6:49 PM
> > Subject: Re: [PHP] Tailing a log file {!?}
> >
> >
> > Hi
> > The following works for me, give it a try with the correct path.
> >
> > <?
> > exec("tail -n 50 /usr/local/apache/logs/access_log",$result);
> > echo count($result)." results returned. <br>";
> > if(count($result) > 0){
> > foreach($result as $line){
> > echo $line."<br>";
> > }
> > }
> > ?>
> >
> > Tom
> >
> >
> > At 06:25 PM 4/05/2002, Liam MacKenzie wrote:
> > >$cmd = exec("tail -n $len /www/hosting/domains/lanolot/logs/$open",
> > >$result);
> > >
> > >echo "$cmd";
> > >
> > >Still returns nothing under the top text.
> > >
> > >All log files are chmodded 644 and are owned by the web server.
> > >The paths to the files are correct.
> > >
> > >I've run out of ideas =(
> > >
> > >Thanks
> > >
> > >
> > >----- Original Message -----
> > >From: "Jason Wong" <php-general@gremlins.com.hk>
> > >To: <php-general@lists.php.net>
> > >Sent: Sunday, May 05, 2002 6:22 PM
> > >Subject: Re: [PHP] Tailing a log file {!?}
> > >
> > >
> > >On Saturday 04 May 2002 16:09, Liam MacKenzie wrote:
> > > > Sorry, I should have included this in the first email...
> > >
> > >[snip]
> > >
> > > > When I call the page, I get the expected at the top:
> > > > Excecuting: tail -n 150 /www/hosting/domains/lanolot/logs/error.log
> > > > Displaying the last 150 lines of error.log...
> > > >
> > > > But there's nothing underneath it.
> > >
> > >1) Check that you have permissions to access the file
> > >2) Add a 'return_var' to your exec() call. And check what this
> contains.
> > >
> > >--
> > >Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > >Open Source Software Systems Integrators
> > >* Web Design & Hosting * Internet & Intranet Applications Development *
> > >
> > >/*
> > >DeVries' Dilemma:
> > >If you hit two keys on the typewriter, the one you don't want
> > >hits the paper.
> > >*/
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>