Welcome to WebmasterWorld Guest from 18.104.22.168
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 846269 bytes) in /results.php on line 125
$res_handle= fopen($output_file, "r");
$results = fread($res_handle, filesize($output_file));
$separated_entries = explode ("//", $results);
Then, foreach chunk, I output the results to the user. Is there something that I must configure in php so that it won't have memory problems? Or another way to slurp the total output file without exhausting the memory?
If they are larger files, consider forking the time intensive process using pcntl_fork(), PHP's implementation of fork(). Basically you will pass off the time-intensive process to the spawned child and return the result to the user immediately in the parent.