CodeIgniter Forums
Uploading CSV error if file contains " double " - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Uploading CSV error if file contains " double " (/thread-68169.html)



Uploading CSV error if file contains " double " - sbudhram - 06-05-2017

I just notice that if I try to upload a file, mainly using .csv files. That if it contains the word "double" in between to spaces, the upload crashed.

e.g if we have the phrase "please double this" 

I have a CSV with the following data.

Sean double Testing,102343,310324,309305,,TEST

,305318,312058,314304,,


RE: Uploading CSV error if file contains " double " - PaulD - 06-05-2017

Are you sure it is crashing because of the word double? Perhaps it is crashing because of what you are doing with it later, perhaps reading the contents field by field etc. Try removing all the bloat and just uploading the file. When you upload a file the contents should have no real affect on the file upload itself, at least the word 'double' would not. I am guessing you are exploding the lines and the additional spaces are crashing whatever you are doing with the data, or in whatever way you are dealing with the file contents.


RE: Uploading CSV error if file contains " double " - sbudhram - 06-05-2017

(06-05-2017, 11:18 AM)PaulD Wrote: Are you sure it is crashing because of the word double? Perhaps it is crashing because of what you are doing with it later, perhaps reading the contents field by field etc. Try removing all the bloat and just uploading the file. When you upload a file the contents should have no real affect on the file upload itself, at least the word 'double' would not. I am guessing you are exploding the lines and the additional spaces are crashing whatever you are doing with the data, or in whatever way you are dealing with the file contents.

Yes.. I tried the same code on a Linux server and it works. We are currently using Apache2.4 on iSeries. I am assuming it's a problem with the iSeries.