* 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
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
- 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]):
I have a text file (log file) that I want
Scott Miller wrote:
I've changed my script to the following:
?php
$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:29 AM
Subject: Re: [PHP] Read Last Lines of a Text File
Scott Miller wrote:
I've changed my script to the following:
?php
$file =/var/log/radius.log;
$fp
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
(currently 8 MB) it
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:
?php
$file =/var/log/radius.log
- 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 -
From: Oliver Hankeln [EMAIL PROTECTED]
To: [EMAIL
[snip]
?php
$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.br;
}
?
I've tried bumping up the 4096 to a higher number because it currently
only
shows me
[snip]
?php
$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.br;
}
?
I've tried bumping up the 4096 to a higher number because it
[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 not
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
* 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 someone
14 matches
Mail list logo