RE: [PHP] Tailing a log file {!?}

2002-05-07 Thread .ben

IIS produced plain-text log files, this is what i'd like to tail ideally.

cheers.

 .ben

> -Original Message-
> From: David Freeman [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2002 02:01
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Tailing a log file {!?}
> 
> 
> 
>  > Is there a tail util for NT/W2K?
> 
> Almost certainly there will be a tool that will read the end of files.
> The problem will be in what you want to look at.  If you want to look at
> log files on NT/2K then, AFAIK, they aren't actually vanilla text files
> so a tail util won't do the job.  I'm not actually sitting near an NT/2K
> box at the moment so I can't check that for certain.
> 
> CYA, Dave
> 
> 
> 
> -- 
> 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




RE: [PHP] Tailing a log file {!?}

2002-05-05 Thread Miguel Cruz

On Mon, 6 May 2002, .ben wrote:
> Is there a tail util for NT/W2K?

I suspect cygwin would include one.

miguel


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




RE: [PHP] Tailing a log file {!?}

2002-05-05 Thread David Freeman


 > Is there a tail util for NT/W2K?

Almost certainly there will be a tool that will read the end of files.
The problem will be in what you want to look at.  If you want to look at
log files on NT/2K then, AFAIK, they aren't actually vanilla text files
so a tail util won't do the job.  I'm not actually sitting near an NT/2K
box at the moment so I can't check that for certain.

CYA, Dave



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




RE: [PHP] Tailing a log file {!?}

2002-05-05 Thread .ben

Is there a tail util for NT/W2K?

 .b

> -Original Message-
> From: Dave Raven [mailto:[EMAIL PROTECTED]]
> Sent: 05 May 2002 10:33
> To: Liam MacKenzie; [EMAIL PROTECTED]; 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" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Tom Rogers" <[EMAIL PROTECTED]>
> 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" <[EMAIL PROTECTED]>
> > To: "Liam MacKenzie" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > 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. ";
> > if(count($result) > 0){
> >  foreach($result as $line){
> >  echo $line."";
> >  }
> > }
> > ?>
> >
> > 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" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >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
>


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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Richard Archer

At 7:26 PM +1000 4/5/02, Liam MacKenzie wrote:
>That doesn't work either!
>Something's going on here...

Are you fully aware of the implications of safe mode?

Who owns the file you're trying to read?
Who owns the PHP script being executed?
What errors are you getting from the script?
What errors show up in the server logs?

 ...R.

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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Dave Raven

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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Tom Rogers" <[EMAIL PROTECTED]>
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" <[EMAIL PROTECTED]>
> To: "Liam MacKenzie" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> 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. ";
> if(count($result) > 0){
>  foreach($result as $line){
>  echo $line."";
>  }
> }
> ?>
> 
> 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" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

That doesn't work either!
Something's going on here...



- Original Message -
From: "Tom Rogers" <[EMAIL PROTECTED]>
To: "Liam MacKenzie" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
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.

";
if(count($result) > 0){
 foreach($result as $line){
 echo $line."";
 }
}
?>

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" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Jason Wong

On Saturday 04 May 2002 16:43, Liam MacKenzie wrote:
> I have PHP's safe mode enabled, can't use backticks.
> And no I can't disable it, I'm hosting a few hundred sites  =)
>
> I looked up "return_var" in the manual and got nothing, had a read of
> return() but don't quite understand how that would benefit what's
> happening.
>
> Could you please give an example?

 ... read the manual entry for exec().

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Absence is to love what wind is to fire.  It extinguishes the small,
it enkindles the great.
*/

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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Tom Rogers

Hi
The following works for me, give it a try with the correct path.

";
if(count($result) > 0){
 foreach($result as $line){
 echo $line."";
 }
}
?>

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" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

I have PHP's safe mode enabled, can't use backticks.
And no I can't disable it, I'm hosting a few hundred sites  =)

I looked up "return_var" in the manual and got nothing, had a read of
return() but don't quite understand how that would benefit what's happening.

Could you please give an example?

Thanks!

Liam

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 6:40 PM
Subject: Re: [PHP] Tailing a log file {!?}


On Saturday 04 May 2002 16:25, 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.

That's not what I meant by 'return_var', check the manual.

> I've run out of ideas  =(

I prefer something simpler than exec(), try:

  $output = `tail -n $len /www/hosting/domains/lanolot/logs/$open`;
  echo $output;

--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
This fortune is inoperative.  Please try another.
*/

--
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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Jason Wong

On Saturday 04 May 2002 16:25, 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.

That's not what I meant by 'return_var', check the manual.

> I've run out of ideas  =(

I prefer something simpler than exec(), try:

  $output = `tail -n $len /www/hosting/domains/lanolot/logs/$open`;
  echo $output;

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
This fortune is inoperative.  Please try another.
*/

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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

$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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Jason Wong

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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

Sorry, I should have included this in the first email...

Here's my full code.  Page is called like this:
log.php?open=access.log&len=150

=



Excecuting: tail -n $len
/www/hosting/domains/lanolot/logs/$open ";
echo "Displaying the last $len lines of
$open...";

exec("tail -n $len /www/hosting/domains/lanolot/logs/$open", $result);

  foreach ($result as $val) {
echo "$val";
  }

?>



=


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.


Any help would be greatly appreciated.

Cheers,
Liam



- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 5:58 PM
Subject: Re: [PHP] Tailing a log file {!?}


On Saturday 04 May 2002 15:32, Liam MacKenzie wrote:
> OK, I did this and it does nothing but cause a loop and crash my
browser...
>
>  exec("tail -n 100 /www/logs/access.log",$result);
>
> for ($i=0; $i<$result; $i++)
> {
>   echo "$result";
> }
> ?>
>
> What's the problem with that?

An infinite loop most likely. Remember, $result is an array. Try:

  foreach ($result as $val) {
echo "$val";
  }

--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
This is National Non-Dairy Creamer Week.
*/

--
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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

It returns nothing

It's got me stumped



- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 5:58 PM
Subject: Re: [PHP] Tailing a log file {!?}


On Saturday 04 May 2002 15:32, Liam MacKenzie wrote:
> OK, I did this and it does nothing but cause a loop and crash my
browser...
>
>  exec("tail -n 100 /www/logs/access.log",$result);
>
> for ($i=0; $i<$result; $i++)
> {
>   echo "$result";
> }
> ?>
>
> What's the problem with that?

An infinite loop most likely. Remember, $result is an array. Try:

  foreach ($result as $val) {
echo "$val";
  }

--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
This is National Non-Dairy Creamer Week.
*/

--
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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Jason Wong

On Saturday 04 May 2002 15:32, Liam MacKenzie wrote:
> OK, I did this and it does nothing but cause a loop and crash my browser...
>
>  exec("tail -n 100 /www/logs/access.log",$result);
>
> for ($i=0; $i<$result; $i++)
> {
>   echo "$result";
> }
> ?>
>
> What's the problem with that?

An infinite loop most likely. Remember, $result is an array. Try:

  foreach ($result as $val) {
echo "$val";
  }

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
This is National Non-Dairy Creamer Week.
*/

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




Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Liam MacKenzie

OK, I did this and it does nothing but cause a loop and crash my browser...

";
}
?>

What's the problem with that?

Cheers,
Liam


- Original Message -
From: "Tom Rogers" <[EMAIL PROTECTED]>
To: "Liam MacKenzie" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 4:35 PM
Subject: Re: [PHP] Tailing a log file {!?}


Hi
You need
exec("tail -n 100 access_log",$result);
$result will be an array with the output of the command.
see http://www.php.net/manual/en/ref.exec.php
for more info
Tom



At 01:51 PM 4/05/2002, Liam MacKenzie wrote:
>Hi guys,
>
>just a simple question, how would I go about displaying the last 100 lines
>of a log file?
>I know that on the command line it's:
>tail -n 100 access_log
>
>Is there a PHP function to do this?
>
>Cheers,
>Liam
>
>
>
>
>--
>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




Re: [PHP] Tailing a log file {!?}

2002-05-04 Thread Tom Rogers

Hi
You need
exec("tail -n 100 access_log",$result);
$result will be an array with the output of the command.
see http://www.php.net/manual/en/ref.exec.php
for more info
Tom



At 01:51 PM 4/05/2002, Liam MacKenzie wrote:
>Hi guys,
>
>just a simple question, how would I go about displaying the last 100 lines
>of a log file?
>I know that on the command line it's:
>tail -n 100 access_log
>
>Is there a PHP function to do this?
>
>Cheers,
>Liam
>
>
>
>
>--
>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] Tailing a log file {!?}

2002-05-04 Thread Liam MacKenzie

Hi guys,

just a simple question, how would I go about displaying the last 100 lines
of a log file?
I know that on the command line it's:
tail -n 100 access_log

Is there a PHP function to do this?

Cheers,
Liam




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