I've got an interesting issue happening. I get the following error when uploading a CSV file with more than 748 rows:
Here's the code:
$handle = fopen($file, "r");
while (($data = fgetcsv($handle, 10000, ",")) !== FALSE) { //<--this is row 33, but the error is occurring with the fopen
if ($rowcnt != 1) {
if ($data[7] == "") {
$data7 = date("Y-m-d H:i:s",strtotime($inspectDate));
} else {
$data7 = date("Y-m-d H:i:s",strtotime($data[7]));
}
$query = "INSERT INTO reportdevices
VALUES(
$data[0],
'$data[6]',
'$data[8]',
'$data7',
$_GET[reportID]
);";
$errnct = 0;
if ($data[6] != "") { //skip blank rows (rows without pass/fail)
$db->query("$query");
} else {
$devcnt--;
}
}
$rowcnt++;
$devcnt++;
}
Here's a sample row from a CSV file:
16424,1000894,TS,13 fl. Stair 1 closet,476,1,p
This is so strange, because I can upload all the CSV files I want as long as there are less than 748 rows. My first guess was this was a php.ini issue, but a 748 row CSV file is about 30K... go up to 1000 rows and its a whopping 60k... not even close to my upload limits.
Any thoughts? This one is really starting to tick me off.