CSV import plugin: No access to PHP CLI

Hi All,

I am currently trying to find a work around for the CSV import plugin’s need to have root access to the PHP CLI path for the import to function. I really want to use the bulk import facility, but because:

  1. The default PHP CLI setting in the Omeka config.ini doesn’t work. See here: http://omeka.org/forums-legacy/topic/csv-upload-error-message/

and because

  1. I cannot get the PHP CLI path from host as they state: As per our system administrators, access to the file path: PHP CLI (Command Line Interface) is non-accessible via our shared servers. Technically this file path is accessed from the server side; however root access to the shared servers are being restricted.

Changing server and tedious repetitive manual data entry is not really an acceptable solution to this issue. So I would really appreciate any thoughts or creative solutions on how to overcome this problem.

Crazy solutions I have dreamed up include:

I can CSV import successfully to a test Omeka.net account. Is there anyway to migrate from .net to .org environments?

Can I inject the CSV metadata into the Omeka database through the PHPmyAdmin interface?

Any help greatly appreciated.

Cheers

Ryan

There is a circuitous trip to .net then back into a standalone Omeka site using the Omeka Api Import plugin, but that will hit the same problem of depending on the PHP CLI.

Directly injecting would be super difficult, since many different tables and links between them are involved.

Instead, your best bet is to change the settings in application/config/config.ini. Look for these lines in that file:

jobs.dispatcher.default = "Omeka_Job_Dispatcher_Adapter_Synchronous"
jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_BackgroundProcess"

Change the jobs.dispatcher.longRunning setting to also be Omeka_Job_Dispatcher_Adapter_Synchronous

That will stop Omeka from trying to use the PHP CLI. However, it also risks taking a long time – longer than the server will allow a request to run. So, you might have to break your CSV file into smaller pieces and import them one piece at a time.

Many thanks Patrick, that solution has worked for my test import of 4 records. No errors appeared and it imported quickly.

I will update this topic if I run into any issues importing a larger number of records.

Cheers

Ryan

Thanks Patrick this solution also works for me with small .csv files of a few dozen records in a shared web hosting environment where calls to PHP CLI are not allowed.

This topic was automatically closed after 250 days. New replies are no longer allowed.