I'm working on putting together a script that parses through a large csv file and puts it into an associative array. Below is the basic debug code I'm trying to get working for now.
It works with the csv files I have that are up to 1.5MB but fails with my 4MB file, returning a generic Error 500. I am using a 1&1 account, so as far as I know more detailed logs are not available. One valuable clue (I believe) is that when I execute this script through an SSH session, it completes and returns the value properly.
Any ideas where to start looking at timeout/filesize properties that would cause it to fail in browser but not in shell session?
Thanks,
Eric
It works with the csv files I have that are up to 1.5MB but fails with my 4MB file, returning a generic Error 500. I am using a 1&1 account, so as far as I know more detailed logs are not available. One valuable clue (I believe) is that when I execute this script through an SSH session, it completes and returns the value properly.
Any ideas where to start looking at timeout/filesize properties that would cause it to fail in browser but not in shell session?
Code:
if ($handle) {
$header = fgetcsv($handle, 1000, "|");
while (($data = fgetcsv($handle, 1000, "|")) !== FALSE) {
foreach ($header as $key=>$heading) {
$row[$heading]=(isset($data[$key])) ? $data[$key] : '';
}
$listings[]=$row;
}
fclose($handle);
print_r($listings[6]["AGENT_FORM_NAME"]);
}
Thanks,
Eric