This was failing for me with PHP Notice: Undefined offset. For some reason beyond my limited PHP comprehension, the script was reading a blank final line even though my CSV didn’t have one. Also, it wasn’t executing the final sendChunk.

Here’s my modified version of the script with those issues fixed.
emoncmsCSVImporter.php.txt (2.9 KB)