Hi,
I’m running Classic through ReclaimHosting. I use the CSV import plugin frequently with success.
Today I got a surprise - a page of code:
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/martindi/public_html/application/libraries/Zend/Form.php on line 2126 [lots of these]
Fatal error: Uncaught Error: Call to undefined function exec() in /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:111 Stack trace: #0 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(‘/usr/local/bin/…’) #1 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath() #2 /home/martindi/public_html/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(30): Omeka_Job_Process_Dispatcher::startProcess(‘Omeka_Job_Proce…’, Object(User), Array) #3 /home/martindi/public_html/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send(‘{“className”:"C…’, Array) #4 /home/martindi/public_html/plugins/CsvImport/controllers/IndexController.php(381): Omeka_Job_Dispatcher_Default->sendLongRunning(‘CsvImport_Impor…’, Array) #5 /home/martindi/public_html/plugins/CsvImport/controllers/IndexController.php(137): CsvImport_IndexController->_dispatchImportTask(Object(CsvImport_Import), ‘start’) #6 /home/martindi/public_html/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction() #7 /home/martindi/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘mapColumnsActio…’) #8 /home/martindi/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #9 /home/martindi/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch() #10 /home/martindi/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #11 /home/martindi/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #12 /home/martindi/public_html/admin/index.php(28): Omeka_Application->run() #13 {main} thrown in /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php on line 111
And then, back on the Dashboard: “Import settings expired. Please try again.”
I’ve tried changing out the file and using a different browser.
Anybody know what the problem could be?
I just got the same or similar error, too. Line 111 in “…application…/Dispatcher.php”
I’ve checked the PHP-INI path and the PHP version.
Running Classic on Reclaim.
Help! Here is my error message:
Fatal error : Uncaught Error: Call to undefined function exec() in /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:111 Stack trace: #0 /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(‘/usr/local/bin/…’) #1 /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath() #2 /home/splivesn/public_html/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(30): Omeka_Job_Process_Dispatcher::startProcess(‘Omeka_Job_Proce…’, Object(User), Array) #3 /home/splivesn/public_html/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send(‘{“className”:"C…’, Array) #4 /home/splivesn/public_html/plugins/CsvImport/controllers/IndexController.php(381): Omeka_Job_Dispatcher_Default->sendLongRunning(‘CsvImport_Impor…’, Array) #5 /home/splivesn/public_html/plugins/CsvImport/controllers/IndexController.php(137): CsvImport_IndexController->_dispatchImportTask(Object(CsvImport_Import), ‘start’) #6 /home/splivesn/public_html/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction() #7 /home/splivesn/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘mapColumnsActio…’) #8 /home/splivesn/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #9 /home/splivesn/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch() #10 /home/splivesn/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #11 /home/splivesn/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #12 /home/splivesn/public_html/admin/index.php(28): Omeka_Application->run() #13 {main} thrown in /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php on line 111
Yesterday, I checked my php path and it still said
background.php.path = “/usr/local/bin/php”
But today I went in and it was blank, so I updated it. [edit: my Omeka auto-updated in the night]
Now I’m getting a different error message:
Fatal error : Uncaught Error: Call to undefined function exec() in /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:111 Stack trace: #0 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(‘/usr/local/bin/…’) #1 /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath() #2 /home/martindi/public_html/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(30): Omeka_Job_Process_Dispatcher::startProcess(‘Omeka_Job_Proce…’, Object(User), Array) #3 /home/martindi/public_html/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send(‘{“className”:"C…’, Array) #4 /home/martindi/public_html/plugins/CsvImport/controllers/IndexController.php(381): Omeka_Job_Dispatcher_Default->sendLongRunning(‘CsvImport_Impor…’, Array) #5 /home/martindi/public_html/plugins/CsvImport/controllers/IndexController.php(137): CsvImport_IndexController->_dispatchImportTask(Object(CsvImport_Import), ‘start’) #6 /home/martindi/public_html/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction() #7 /home/martindi/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘mapColumnsActio…’) #8 /home/martindi/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #9 /home/martindi/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch() #10 /home/martindi/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #11 /home/martindi/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #12 /home/martindi/public_html/admin/index.php(28): Omeka_Application->run() #13 {main} thrown in /home/martindi/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php on line 111
It looks like Reclaim updated your server.
Newer PHP on a newer server isn’t a big issue; you can just update Omeka if necessary. The problem here is that the server now is disabling the exec function. That’s what Omeka Classic uses to run background jobs, so you won’t be able to use something that runs in the background like CSV Import.
You might want to check with Reclaim that the disabling of exec is intentional and whether you have any options for having it enabled.
1 Like
jflatnes:
Thank you for your guidance. I will check with Reclaim to see if they can rescue the exec command.
Before seeing your response here, I had prepared a detailed trouble ticket. I paste it below in the interest of keeping track on the Forum. Sure enough, the error points to the exec function.
> Ticket for Omeka Support
Short Title
Unexpected Failure of CSV Import Plugin
Request & Problem
I need guidance for repairing a failure condition for CSV Import.
I have reviewed and verified my Omeka installation and the CSV Import plugin installation. I have exhausted all debugging steps that a regular user can perform.
Problem: upon executing CSV Import with a known-good CSV file, after completing the field-mapping panel the system presents the user with the error message shown below.
When the user navigates back from the error page, the system reverts to the CSV Import “Import Items” tab. User selecting the “Status” tab results in the list of submitted jobs, with Status showing “Queued” for each of the failed submissions. Apparently the process has started a job but halts on the error condition.
Context
- Running Omeka 3.2 on Reclaim Hosting.
- PHP 8.3
- PHP-CLI path in config.ini is set to <background.php.path = "/usr/local/bin/php”>
- Error reporting is set to in .htaccess
Also:
- I administer two Omeka installations, each in its own domain.
- One installation has run normally for several years.
- On this first installation, I had tried to get CSV Import working, but failed and so used other methods to import files and metadata.
- I have not touched this first installation for about a year.
- However, last week I updated the CSV Import plugin and did successfully import 104 records with files. CSV Import operated normally.
- Yesterday I created a new domain with another Omeka install and installed the CSV Import plugin.
- On this second domain installation I repeated the CSV Import process with the same CSV file used with previous success, but CSV Import threw the error.
- I attempted to reproduce the successful import on the first installation, but now it throws the same error.
- I inspected all settings and re-installed CSV Import but the error persists.
Error Pointer with Code
Fatal error: Uncaught Error: Call to undefined function exec() in /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:111
Code Snippet from <Dispatcher.php> (Line 111 in Boldface)
/**
* Checks if the configured PHP-CLI path points to a valid PHP binary.
* Flash an appropriate error if the path is invalid.
/
private static function _checkCliPath($cliPath)
{
/*
* All of this could be moved, or also used, when actually setting the
* php_cli_path option
*/
// Try to execute PHP and check for appropriate version
$command = escapeshellarg($cliPath) . ’ -v’;
$output = ;
exec($command, $output, $returnCode);
if ($returnCode != 0) {
throw new RuntimeException(__('The configured PHP path (%s) is invalid.', $cliPath));
}
Full error message:
Fatal error: Uncaught Error: Call to undefined function exec() in /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:111 Stack trace: #0 /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(‘/usr/local/bin/…’) #1 /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath() #2 /home/splivesn/public_html/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(31): Omeka_Job_Process_Dispatcher::startProcess(‘Omeka_Job_Proce…’, Object(User), Array) #3 /home/splivesn/public_html/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send(‘{“className”:"C…’, Array) #4 /home/splivesn/public_html/plugins/CsvImport/controllers/IndexController.php(386): Omeka_Job_Dispatcher_Default->sendLongRunning(‘CsvImport_Impor…’, Array) #5 /home/splivesn/public_html/plugins/CsvImport/controllers/IndexController.php(137): CsvImport_IndexController->_dispatchImportTask(Object(CsvImport_Import), ‘start’) #6 /home/splivesn/public_html/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction() #7 /home/splivesn/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘mapColumnsActio…’) #8 /home/splivesn/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #9 /home/splivesn/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch() #10 /home/splivesn/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #11 /home/splivesn/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #12 /home/splivesn/public_html/admin/index.php(28): Omeka_Application->run() #13 {main} thrown in /home/splivesn/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php on line 111
I put in a support ticket with ReclaimHosting. After a couple of tries, they were able to fix it and I’m able to import using CSV Import. They said that the “Infrastructure team removed the exec restriction.”
Hope it works for you now!
Yep… Reclaim fixed it (after a couple of tries). I’m happy; good job on the support.