CSV Import Generating Errors

11 views
Skip to first unread message

Dan

unread,
Nov 6, 2009, 2:54:12 PM11/6/09
to Omeka Dev
When using CSV import to upload images, we are getting a ridiculous
amount of errors. Here is one of them. Each image uploaded generates
roughly 8mb worth of errors. So we batch uploaded 1400 images and
ended up with a 10GB log file.

[Fri Nov 06 13:46:58 2009] [error] [client 129.1.58.150] PHP Warning:
fgetcsv() expects parameter 1 to be resource, boolean given in /var/
www/hosts/memories/html/cm10/plugins/CsvImport/models/CsvImport/
File.php on line 321, referer: https://memories.bgsu.edu/cm10/admin/csv-import/index/map-columns

I was wondering if anyone else has had this problem or has already
addressed this issue.

Dave Lester

unread,
Nov 9, 2009, 3:35:08 PM11/9/09
to Omeka Dev
Hi Dan,

Can you give an example of the data that you're mapping to upload a
file w/ the CSV Import plugin? Is it a web url, or a relative path
within a server? Do you have the proper server permissions to access
the files? Also, what does the server log look like?

Dave

Will Riley

unread,
Nov 11, 2009, 11:12:33 AM11/11/09
to Omeka Dev
Hey Dan,

This may help:
http://omeka.org/forums/topic/problems-with-csv-import-plugin

Here's my best guess about what happened:
The background process did not have permission to read the file (the
column mappings does not use the php-cli), so the handle was null.
Since the handle null and was not checked, it got stuck in the while
loop which tries to read the file with fgetcsv, and this in turn
filled up the log with warnings.
I have since updated the trunk of the CsvImport plugin to check for
the file handle, so there should be no more giant log of warnings.
The next thing to do is to:

1) Use svn to get the CsvImport plugin from the trunk and install it.
(the forum link explains how to do this)
2) Find out which user the server uses to run the php-cli, and make
sure this user has permission to read your csv files.

If you can't use svn, we will probably publicly release an updated
version of the CsvImport in the next week or so with these changes.

Thank you for finding this bug and let us know if the problem is
fixed.

Will


On Nov 6, 2:54 pm, Dan <djh0...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages