I'm getting the following error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes)
The line that it is failing on is while (($dataInputRecord = fgetcsv($inputFile, $maxRowLength, ",")) !== FALSE)
from this block of code:
if (($inputFile = fopen($fileName, "r")) !== FALSE) {
while (($dataInputRecord = fgetcsv($inputFile, $maxRowLength, ",")) !== FALSE) {
// do stuff
}
fclose($inputFile);
}
The entire file is 32MB. Playing around with the size of $maxRowLength
didn't help. I'm convinced that the problem is the file size, because truncating it to 8 KB solves the problem. How can I make it not care about file size?
Edit: Looks like my boss was misleading me about what the code within the loop was supposed to do