Yii Framework Forum: importcsv error second step - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

importcsv error second step Rate Topic: -----

#1 User is offline   p0rsche 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 24-January 12
  • Location:Omsk, Russia

  Posted 24 January 2012 - 01:46 PM

Hi,
I use importcsv extension and get 500 Error from php like this:
file_get_contents(uploaddir/file.csv) [function.file-get-contents]: failed to open stream: No such file or directory (site\protected\modules\importcsv\controllers\DefaultController.php:86)

The problem is file uploaded saved without first letter (??), so my when I choose file.csv it saves as ile.csv.
And then in 'File' field shows 'ile.csv'. But script is looking for 'file.csv' and raises an error.
More, when i rename ile.csv to file.csv it shows me third step, where i choose appropriate rows\fields. And when I continue it raises an 500 error again (no file). I rename my 'file.csv' to 'ile.csv' again and then I see 'No errors' after exporting rows (but nothing saves into database).

But my main question is: why file.csv saves without first letter?

Thanks!
There is nothing that is impossible
0

#2 User is offline   mrtain 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-November 11

Posted 01 February 2012 - 09:19 AM

Did you have to modify any of the extension to get it to work?
I keep getting the 'Error: Download file is not a .csv' message when I've chosen the csv file (I've tried several variations of csv with different delimiters)
0

#3 User is offline   p0rsche 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 24-January 12
  • Location:Omsk, Russia

Posted 01 February 2012 - 01:43 PM

View Postmrtain, on 01 February 2012 - 09:19 AM, said:

Did you have to modify any of the extension to get it to work?
I keep getting the 'Error: Download file is not a .csv' message when I've chosen the csv file (I've tried several variations of csv with different delimiters)

Nope.. I've just preferred to use EAjaxUpload and wrote CSV parser wrapper for my needs.
So I suggest you to do so.
There is nothing that is impossible
0

#4 User is offline   mrtain 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-November 11

Posted 02 February 2012 - 05:51 AM

View Postp0rsche, on 01 February 2012 - 01:43 PM, said:

Nope.. I've just preferred to use EAjaxUpload and wrote CSV parser wrapper for my needs.
So I suggest you to do so.



Will do, thanks for the advice ^_^
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users