I try to get an 440mb CSV file into array:
$handle = fopen("stuff.csv", "r");
$data = array();
while (($line = fgetcsv($handle, 1000, ';')) !== FALSE)
{
$data[] = $line;
}
it breaks up after about 20 seconds, in the PHP ini the max_execution_time is set to 50 and memory_limit to 1024. What could be the trouble?
Mor just 1024?You can:
error_logvalue inphp.inimemory_limitissueIn the future, it is more efficient to process large files in background scripts. You can use Gearman for that.