Page 1 of 1

Problem reading large (>6MB) text files

Posted: Fri May 30, 2003 1:55 pm
by daven
I am trying to read apache's access_log, which is currently about 14MB. I have tried using file() and fopen()/fread(). Through experimentation with fread, I have discovered that I can read the file up to about 5930000 bytes [ie-- fread($fp,5930000)]. Anything larger than that, and I get a browser error message stating that "The file contains no data".

My configuration settings are as follows:
php.ini:
max_execution_time=900
memory_limit=32M

php 4.3.1
FreeBSD 4.3
apache 1.3.27

This worked previously, but it fails now. I have not changed the code, but my virtual host altered some settings.
Any ideas as to what might be happening?

Posted: Fri May 30, 2003 8:30 pm
by cmkpl
use while !EOF to seperate the process