CsvImport appears as though it is working, but no upload happens

Hi,

CsvImport appears to be working, but the upload screen just sits there and items never get uploaded. And we don't get any error messages, either.

Any input appreciated.

Jill

Hi Jill,
Are you running version 1.1? Initially we have version 1.0 but have upgraded it to work out a few bugs.

Try uninstalling and deleting the old plugin files, and then upload version 1.1.

If that doesn't work, let us know.

Sheila

Hi Sheila,

We already have version 1.1.

Jill

Hi Sheila,
I have the same problem with CsvImport. I tried to upload a very small and simple csv file and apparently CsvImport works but then it stucks on the status "import in progress" and that's it... I am working with 1.1
thanks

This issue occurs when the plugin is not configured correctly. Go to the CsvImport plugin configuration page. Then check the Path to PHP-CLI setting. Make sure you entered the correct path to your php 5 binary. Different web hosts have different places where they put this file. For example, the path to php version 5 on DreamHost is:
/usr/local/php5/bin/php

Let me know if this helps.

Oh jesus if it helps!! Yes it works, at least it worked with your test file... but how I could figure it out if you weren't there?

Thank you very much of course :-)

Glad its working now, cinzia! We'll look into making the plugin detect this path automatically when possible, and also update the documentation to help users check the PHP-CLI path.

I am not sure how to configure the path.

I think that it's /user/etc/php5

Any way I could send a screenshot of where my php folder is and you could verify where it is for me?

Hi stolafomeka,

Your PHP folder is somewhere on your server, so a screenshot wouldn't help to find it. But, since you know the path you already know where it is!

To add that path to the CSV Import plugin's configuration:

1) Log in to your Omeka's admin
2) Go to Settings > Plugins, and click on the "Configure" link in the row for the CSV Import plugin.
3) You'll be presented with a configuration form, and one of the fields is 'Path to PHP-CLI'. Add that path to that field and save your changes.

Hi Jeremy,

I have the GUI set up on Ubuntu, so I could navigate to the PHP folder and send you a screenshot, so you could see if there is anything that I'm not representing in the path. I am not sure what the root directory is called on my system, whether it is user or possibly home.

I understand how the configuration interface works, I am unsure about the correctness of the syntax of the path I have entered.

I have tried the path /user/etc/php5 and the upload still behaves the same as before.

Any input appreciated,

Jill

Hi Jill,

Logging in to your server via the command line and typing 'which php' is one way to find the path to PHP. It should return a path, like '/usr/etc/php' or something similar.

Best,
Jeremy

Hi Jeremy,

Okay, I have 2 versions of php, one php and one php5. I have set it the plugin to /usr/bin/php5.

Unfortunately, Omeka still it doesn't load using CSVImport.

The other odd thing is that according to the GUI, the path is /usr/etc/php5

Are there any known issues with php5?

Thanks,

Jill

Hello,
we are using the latest version of CSVImport( 1.1-1.1.1)on Omeka1.1.
Same problem with the upload. The import process gets stuck every time. The server configuration is correct and we don't know what may have caused the problem.

xc

Hey aacat,

I don't know what finally fixed this problem for us, but here is what we did. We nuked our installation, reinstalled Apache, reinstalled, reinstalled PHP, reinstalled Omeka and plugins, and changed the path in the configuration to /usr/bin/php

Some tweaking of PHP install was required, and I don't recall what exactly our systems dude did.

Hope this helps....

Jill

We are hoping to release a new version of the plugin by early next week. We know there have been issues, and we're working on it!

Hi - I am experiencing the same problem - I contacted my web support to get the path to php-cli and they told me usr/bin/php - I also used the 'which php' command and it said usr/local/bin/php - I tried both but they just hang. I am running the latest version of cvsImport and have tried uninstall, and reinstall, but nothing seems to work. Should I just wait for your next release? Thanks a lot.

Hi scott,

Are you using CsvImport 1.1-1.1.1 on Omeka 1.1?

If so, go to the applications/config/config.ini file and change the background.php.path setting to:


background.php.path = "/usr/bin/php"

Let me know if this helps.

In the previous post I meant to type "application/config/config.ini" instead of "applications/config/config.ini"

Sorry about that.

Scott,

I'm really sorry. My former comments apply to the next version of the plugin, which we have not released yet.

Still, you should be able to get the CsvImport 1.1-1.1.1 to work by changing the PHP-CLI plugin configuration setting to:


/usr/bin/php

Basically, make sure that the PHP-CLI path begins with the forward slash.

Let me know if this works.

Hi - yes I am running 1.1 - 1.1.1 & I have tried both /usr/bin/php and /usr/local/bin/php but neither seems to work. Any help would be appreciated. When is the next version of the plugin being released? Thanks a lot.

Scott,

I'm not exactly sure what's going on, but I would do this:

1. Uninstall your CsvImport plugin.
2. Install it again.
3. Try to import the test.csv file.
4. Goto the status page.
5. Report the status to me.

I will be releasing the CsvImport 1.1-1.2 plugin for by the end of this week. This version of the plugin will require Omeka 1.1

Hey Scott,

We just released CsvImport 1.1-1.2

You need to have Omeka 1.1 to use it.

-Will

Hi -
yes, I have tried uninstalling and re-installing without any good results.

I reconfirmed with my Web provider that PHP-CLI is available for PHP 5 at the following paths: /usr/bin/php
/usr/bin/php5-cli
/usr/bin/php-cli
/usr/bin/php5

Basically, the test.csv file just shows "Import in Progress" 0/3 items

I also installed the new version of the plug-in. I am running 1.1 Omeka. I noticed that you do not require the PHP-CLI configuration selection anymore. However, I still cannot import the test.csv file - so this config does not seem to be the issue.

Do you have any ideas?

Other plugin seem to work ok on my server.

Try /usr/local/bin/php. That worked for me. Keep trying the "typical" locations. /usr/local ..., /usr/bin ... &c.
Version 1.2 that came out earlier today (1/7) has severe problems. While it does not prompt for the location of the php executable, it caused one entire Omeka site to grind to a halt and freeze. Only by deleting the CSV directory via FTP and then waiting for 10 minutes or so for the site to clear, was normal operation restored. I then uploaded and reinstalled the version 1.1.1, configuring as above and success!.

E. Lewis, I'd like more information about the 1.2 bug you found. Did it cause problems upon installation or when you were trying to import something?

E. Lewis,

I forgot to mention that in terms of not prompting you for the local of the php executable, the CsvImport 1.2 plugin uses the global php-cli setting defined in the applications/config/config.ini file.

E. Lewis,

I just retested CsvImport 1.2 on Omeka 1.1 with the test.csv file, and it worked fine, as long as I had the php executable specified in background.php.path setting in the application/config/config.ini file.

Thanks for your post and let me know if this works on your server.

I am responding to your 3 posts in order.
1) Problems upon installation. Clicking the "csv import" tab caused the freezing. Did not get the opportunity to import.
2) I looked at the applications/config/config.ini file. The last line read: background.php.path = "".
3) I modified the last line to read in the location of the executable so it now reads: background.php.path = "/usr/local/bin/php"
At this point the plugin works fine.
I hope this helps. There must be something wrong with the auto-detection mechanism for the executaable. This is the issue that I was fighting with as well as Scott right above me.
Thanks.

I still haven't got either version to work. I tried setting the background path to "/usr/bin/php" which is probably the default. That didn't work. Then I changed it to "/usr/bin/php5" and the web provider suspended my account. Here is the email they sent me with some logging information. Maybe this can help you figure out what is going one.

Dear Customer,

We had to suspend your account because of the following vulnerabilities from your account:

log CRITICAL - [/var/log/messages: c=1,w=0,a=1227] [/var/log/secure: c=0,w=0,a=4] [/usr/local/apache/logs/error_log: c=0,w=0,a=345] /var/log/messages: CRITICAL: Jan 8 14:15:12 rpdz2 httpd: EW_EXEC_DENY: IP(173.56.108.156) FILE(/home/jsvportn/public_html/omeka/admin/index.php) EXEC(/usr/bin/php5 /home/jsvportn/public_html/omeka/application/core/background.php -p 9 -l initializeRoutes > /dev/null 2>&1 &) URI(/omeka/admin/csv-import/index/map-columns)

Please recheck your application and remove corresponding code.

I got my account reactivated and set the path back to the way it was, but now am a little spooked to use this version. Any ideas? Thanks.

Hi scott,

There's no need to be spooked. It's just that your webhost is restrictive and does not allow you to use the php executable in the way that Omeka needs to use it. Omeka uses background processes, and it needs a way to run a php script in the background. Apparently, your webhost does not like this. Who is your webhost? You may need to get a webhost that allows you to execute php from within php scripts.

Scott: the last part of the executable will be php, not php5. php5 may be one of the directories in the tree, but be sure that whatever you put ends with /php. For example /usr/bin/php5/php is legitimate. /usr/bin/php5 is not.
Good luck.

E Lewis makes a good point.

First, thank you wanderingwill and E. Lewis for all your kind help. I am using DailyRazor as my webhost. In their terms of use I found the following:

"4.12 You agree not to run any background and/or listening processes. You also agree not to engage in any activity (through your code, processes, jobs, etc) that will affect the server and/or customer accounts on the said server."

So I take it from that that they block my efforts to use CSVImport. Do you agree that's the problem?

Would you have any suggestion for a webhost that allows background tasks? Thanks

Scott,

There are many webhosts to choose from. Personally, I have a Dreamhost account. The php-cli path for Dreamhost is:

/usr/local/php5/bin/php

Also, here's a link in the documentation:

http://omeka.org/codex/Hosting_Suggestions