We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

What to do if you are getting "Unknown upload error" - CSV import | Forum

Oxwall Software
Oxwall Software Nov 20 '13
Several users have reported "Unknown upload error".
We can't reproduce this error using provided data on our end.

1.Please try uploading attached .csv file for testing purposes. This will help us to find out whether the issue is with your archives or with the script:
If you will get the same "Unknown upload error" with our file we need:

2. screen shot of the page where you are getting this error
3. version of Oxwall, version of php.

If our file uploads successfully, but your's doesn't, attach exact .zip or .csv file to your reply along with your version of Oxwall and Php.

In both cases make sure that ow_pluginfiles folder and all folders within it have 777 permissions on your server.

The Forum post is edited by Oxwall Software Nov 20 '13
Attachments:
  memberdatashort.csv (0.11Kb)
Aodh
Aodh Nov 24 '13
1. After doing all the above, I'm still getting Unknown Upload Error.

2. Attached screenshot

3. Latest version of Oxwall, PHP version 5.3
Attachments:
  ScreenHunter_03 Nov. 24 14.07.jpg (24.02Kb)
Alia Team
Alia Nov 26 '13
Aodh, just to confirm, you have correct permissions for ow_pluginfiles and all folders within it?
Aodh
Aodh Nov 27 '13
Yes, permissions are set correctly.
Mawan A. Nugroho
Mawan A. Nugroho Dec 26 '13
I also experienced the "File upload error". All possibilities have been tried. In fact I have done a "Clean install". I am using Windows 8.1 and Google Chrome.

Frustrated, I moved to another computer. Mac OS X and Mozilla Firefox. Strange. There are no barriers. Upload process runs smoothly.

Sounds silly and unreasonable. But this is what happened to me.
ecl
ecl Dec 30 '13
Even with ow_pluginfiles folder and all folders within 777 permissions on your server and the sample file memberdatashort.csv , it show a message " Unknown upload error "

This is the screenshot with the csv upload


and this is the screeshot with a zip upload



Oxwall looks to be a very nice software, so I would like somuch to import my data and get rid off my old software.
With which version of oxwall the data import plugin is normally made for?

The Forum post is edited by ecl Dec 30 '13
Paul Fuller
Paul Fuller Feb 2 '14
It is because the .csv file is detected as an application/vnd.ms-excel type. Just two simple changes and the upload works.


controllers/admin.php


where


case 'text/csv':


change to


case 'text/csv':

case 'application/vnd.ms-excel':


in forms/csv_uploader.php


where 


array( 'text/csv', 'application/zip'


change to


array('application/vnd.ms-excel', 'text/csv', 'application/zip'


that is all it is....


stop degree discrimination

The Forum post is edited by Paul Fuller Feb 2 '14
Paul Fuller
Paul Fuller Feb 2 '14
Depending on the OS and browser a csv may be detected as any of these


'text/csv', 'text/plain','application/csv','text/comma-separated-values',    'application/excel',    'application/vnd.ms-excel','application/vnd.msexcel','text/anytext','application/octet-stream',    'application/txt',

The Forum post is edited by Paul Fuller Feb 2 '14
Oxwall Software
Oxwall Software Feb 3 '14
Thanks for sharing Paul.
Julien
Julien Apr 11 '14
I run into the same problem. I have unknown upload error. I have used the test-file. Put evertyhing in plugin folder to 777 and also patched it with the changes above.

Still not working.
Julien
Julien Apr 11 '14
Ok did some debugging, but it seems my file is recognized as:
application/binary-stream

So if you run into this problem and want to find out your type, use the following:

            else
            {
               // $this->setErrorMessage( OW::getLanguage()->text('csvimporter', 'upload_error_unknow') );
                $this->setErrorMessage($_FILES['csv_file']['type']);

            }

It will then throw an error and show your type.
Julien
Julien Apr 11 '14
Well I run into more problems with this plugin:

Message: fgetcsv() expects at most 4 parameters, 5 given File: /var/www/html/ow_plugins/csv_importer/bol/service.php Line: 175

I've found that last parameter escape was added only in PHP 5.3.

I did also get the following error:

Message: Argument 1 passed to CSVIMPORTER_BOL_Service::checkEnclosure() must be an array, null given, called in /var/www/html/ow_plugins/csv_importer/bol/service.php on line 177 and defined File: /var/www/html/ow_plugins/csv_importer/bol/service.php Line: 113
Trying to find out if removing the "escape" works.
Julien
Julien Apr 11 '14
Well removing the escape parameter seems to kick of the fille. A cron job is added, so I am curious if it works ok now. So what I did is:

Updated:
        while ( ($data = fgetcsv($this->fileHandler, 0, $delimiter, $enclosure, $escape)) !== FALSE )

To:
        while ( ($data = fgetcsv($this->fileHandler, 0, $delimiter, $enclosure)) !== FALSE )

Julien
Julien Apr 11 '14
Well I give up. The progress bar is stuck at 0%. Cron jobs is running every minute and I am even kicking it off manually, just to see if it works.

File is not being imported, also not your test file. I am going to try to use the importer plugin itself.
Steve Parkinson
Steve Parkinson May 25 '14

Hi Paul,


Any chance you could write this in "dummy language" for me please. Do I do this through ftp? Can it be done through the admin panel? If so idiot proof directions as to where to find the files to change... Help appreciated..
Quote from Paul Fuller It is because the .csv file is detected as an application/vnd.ms-excel type. Just two simple changes and the upload works.


controllers/admin.php


where


case 'text/csv':


change to


case 'text/csv':

case 'application/vnd.ms-excel':


in forms/csv_uploader.php


where 


array( 'text/csv', 'application/zip'


change to


array('application/vnd.ms-excel', 'text/csv', 'application/zip'


that is all it is....


stop degree discrimination


Steve Parkinson
Steve Parkinson May 25 '14
Ok, I just sussed it.


So, you will find the files that Paul is talking about using ftp in the folder location 


(root folder)/ow_plugins/csv_importer/controllers/admin.php

and

(root folder)/ow_plugins/csv_importer/forms/csv_uploader.php


I used Coffe Cup Direct ftp, which enable you to directly edit the files and save the changes to your remote file.


Thanks Paul, this got the CSV Importer working.

Steve Parkinson
Steve Parkinson May 26 '14

Quote from Julien Well I give up. The progress bar is stuck at 0%. Cron jobs is running every minute and I am even kicking it off manually, just to see if it works.

File is not being imported, also not your test file. I am going to try to use the importer plugin itself.
It can take some time, how many users are you trying to upload?
Julien
Julien May 27 '14
It was about 2000 users. And it kept being in this state for about two days, and still 0%. So it is really not working. I did the conversion manually ;).
Ketan
Ketan Nov 15 '16
I have made changes in csv_importer/controllers/admin.php

and

csv_importer/forms/csv_uploader.php


as per above mentioned points and try to uplaod csv file but didn't work for me.


Can you please let me know what exactly issue here, so its helpful for us,


Thanks

Attachments:
  csv.csv (0Kb)
Ketan
Ketan Nov 15 '16
Hi Paul, 

I want to help in this issue from your side, because you are used this plugin and worked for you. And let me know if any others change needed, so we can make it accordingly.


Thanks in advance

You do not have permission to reply this topic