CSV 2.0 import error

I am unable to upload anything using the CSV import plugin with Omeka 2.0. I've tried several CSV files and always get the same error message: "RuntimeException The configured PHP path is invalid." This is followed by:

#0 /myOmekapath/application/libraries/Omeka/Job/Process/Dispatcher.php(94): Omeka_Job_Process_Dispatcher::_checkCliPath('/usr/bin/php')
#1 /myOmekapath/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath()
#2 /myOmekapath/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(31): Omeka_Job_Process_Dispatcher::startProcess('Omeka_Job_Proce...', Object(User), Array)
#3 /myOmekapath/application/libraries/Omeka/Job/Dispatcher/Default.php(150): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send('{"className":"C...', Array)
#4 /myOmekapath/plugins/CsvImport/controllers/IndexController.php(388): Omeka_Job_Dispatcher_Default->sendLongRunning('CsvImport_Impor...', Array)
#5 /myOmekapath/plugins/CsvImport/controllers/IndexController.php(128): CsvImport_IndexController->_dispatchImportTask(Object(CsvImport_Import), 'start')
#6 /myOmekapath/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction()
#7 /myOmekapath/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('mapColumnsActio...')
#8 /myOmekapath/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /myOmekapath/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#10 /myOmekapath/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#11 /myOmekapath/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#12 /myOmekapath/admin/index.php(28): Omeka_Application->run()
#13 {main}

Can someone tell me what's happening here??

Do you have the PHP CLI interpreter installed?

That's what Omeka uses to run background, long-running processes like imports. The error message indicates that Omeka thinks you have the PHP binary installed at "/usr/bin/php"

Is the binary there?

It seems that it's a matter of changing the autodetect path for PHP-CLI in the application/config/config.ini file.

We (emmaro and I) changed line 152 in the "Background Scripts" section of the config.ini file to:

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

And it seems to be working fine now. I guess it was just looking in the wrong path for PHP-CLI. Thanks for the response!

Hey guys,

I have got exactly the same problem but even after modifying the config.ini file as described above, I wasn't able to use the latest version of CSV Import and I still have the 'RuntimeException The configured PHP path is invalid.'

Many thanks for your help.


Do you actually have the PHP CLI binary installed at /usr/local/bin/php? Not all servers have the CLI binary, and those that do often have it at a different location.

Thanks for your answer. You were right: I have just asked my host and my server does not have the PHP CLI binary. Do you know any other way to upload a csv file by any chance?

You can make the importer not run in the background, which would remove the dependency on the CLI binary.

Note: running synchronously, as described in that post I linked to, means you'll run into PHP and HTTP time limits, so it's really only suitable for smaller data sets that can be imported in a relatively short amount of time.

Thanks a lot John. It's working now!