> [snip]
>
> $file ="/var/log/radius.log";
>
>
> $fp = popen("/usr/bin/tail -$limit $file", 'r');
> if (! $fp ) {
> echo 'unable to pipe command';
> }
> while (!feof($fp) ) {
>$line = fgets($fp, 4096);
> print $line."";
>
>
> }
> ?>
>
> I've tried bumping up the 4096 to a higher numb
[snip]
";
}
?>
I've tried bumping up the 4096 to a higher number because it currently
only
shows me 10 lines - I'd like to see about 30. No matter what I change
the
number to, it still only shows 10 lines. What do I need to do to get
more
that the 10 lines?
[/snip]
I am jumping in late so I m
- Original Message -
From: "Oliver Hankeln" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 10:01 AM
Subject: Re: [PHP] Read Last Lines of a Text File
> Scott Miller wrote:
>
> > - Original Message -
> >
Scott Miller wrote:
- Original Message -
From: "Oliver Hankeln" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:29 AM
Subject: Re: [PHP] Read Last Lines of a Text File
Scott Miller wrote:
I've changed my script to the following:
Try adding number of bytes to read.
$line = fgets($fp, 4096);
>
>> * Thus wrote Scott Miller ([EMAIL PROTECTED]):
>> > I have a text file (log file) that I want to be able to read the last
>> 30
> or
>> > 40 lines of. I've created the code below, but since this file is so
> large
>> > (curren
- Original Message -
From: "Oliver Hankeln" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:29 AM
Subject: Re: [PHP] Read Last Lines of a Text File
> Scott Miller wrote:
>
> >>>I've changed my script to the fol
Scott Miller wrote:
I've changed my script to the following:
$file ="/var/log/radius.log";
$fp = popen("/usr/bin/tail -$limit $file", 'r');
if (! $fp ) {
echo 'unable to pipe command';
}
while (!feof($fp) ) {
$line = fgets($fp);
print $line;
}
?>
And now get the following errors:
Warning: Wrong
- Original Message -
From: "Oliver Hankeln" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:13 AM
Subject: Re: [PHP] Read Last Lines of a Text File
> Scott Miller wrote:
>
> >>* Thus wrote Scott Miller ([EMAIL PROTECTED
Scott Miller wrote:
* Thus wrote Scott Miller ([EMAIL PROTECTED]):
I have a text file (log file) that I want to be able to read the last 30
or
40 lines of. I've created the code below, but since this file is so
large
(currently 8 MB) it won't work. The code works on smaller files, but
not
this on
> * Thus wrote Scott Miller ([EMAIL PROTECTED]):
> > I have a text file (log file) that I want to be able to read the last 30
or
> > 40 lines of. I've created the code below, but since this file is so
large
> > (currently 8 MB) it won't work. The code works on smaller files, but
not
> > this one
* Thus wrote Scott Miller ([EMAIL PROTECTED]):
> I have a text file (log file) that I want to be able to read the last 30 or
> 40 lines of. I've created the code below, but since this file is so large
> (currently 8 MB) it won't work. The code works on smaller files, but not
> this one. Can some
Or maybe execution time limit.
[snip]
I've created the code below, but since this file is so large
(currently 8 MB) it won't work.
[/snip]
I would guess you are running into your php memory_limit.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[EMAIL PROTECTED] (Scott Miller) wrote in
news:[EMAIL PROTECTED]:
> I have a text file (log file) that I want to be able to read the last
> 30 or 40 lines of. I've created the code below, but since this file
> is so large (currently 8 MB) it won't work. The code works on smaller
> files, but no
[snip]
I've created the code below, but since this file is so large
(currently 8 MB) it won't work.
[/snip]
I would guess you are running into your php memory_limit.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
14 matches
Mail list logo