CSV Import 'PHP-CLI error: job script failed to execute

Hello

I’m getting the below error when doing a CSV import. Didn’t see anyone else with this issue in the forums so figured I’d open a new one. If anyone can make sense of this for me that would be awesome.

The error log I get is below. Thanks!

2018-08-14T13:53:55+00:00 ERR (3): Command “/usr/local/bin/php ‘/home/kscrnew/public_html/omeka/application/data/scripts/perform-job.php’ --job-id ‘10’ --base-path ‘/omeka’ > /dev/null 2>&1 &” failed with status code .
2018-08-14T13:53:55+00:00 ERR (3): exception ‘Omeka\Job\Exception\RuntimeException’ with message ‘PHP-CLI error: job script failed to execute.’ in /home/kscrnew/public_html/omeka/application/src/Job/DispatchStrategy/PhpCli.php:78
Stack trace:
#0 /home/kscrnew/public_html/omeka/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\PhpCli->send(Object(Omeka\Entity\Job))
#1 /home/kscrnew/public_html/omeka/application/src/Job/Dispatcher.php(91): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\PhpCli))
#2 /home/kscrnew/public_html/omeka/modules/CSVImport/src/Controller/IndexController.php(47): Omeka\Job\Dispatcher->dispatch(‘CSVImport\Job\I…’, Array)
#3 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): CSVImport\Controller\IndexController->mapAction()
#4 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#5 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#6 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#7 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-mvc/src/DispatchListener.php(138): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#8 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#9 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /home/kscrnew/public_html/omeka/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#11 /home/kscrnew/public_html/omeka/index.php(21): Zend\Mvc\Application->run()
#12 {main}

Can you post the complete contents of the “System information” screen? (Linked in the footer of every admin page.)

Omeka S
Version 1.2.0
PHP
Version 5.6.37
SAPI cgi-fcgi
Memory Limit 128M
POST Size Limit 74M
File Upload Limit 64M
Garbage Collection Yes
Extensions bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, suhosin, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, Zend OPcache, zip, zlib
Disabled Functions apache_child_terminate, dl, exec, leak, passthru, pclose, pfsockopen, popen, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate
MySQL
Server Version 5.5.5-10.1.35-MariaDB
Client Version mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
Mode NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION
OS
Version Linux 2.6.32-696.3.2.el6.x86_64 x86_64

Anyone have any clues on this error?

exec seems to be disabled, and proc_open too: they are the two functions used to do background task. So either enable them, eventually modify your config/local.config.php if you use proc_open:

    'cli' => [
        'execute_strategy' => 'proc_open',
        'phpcli_path' => null,
    ],

If you can’t, you’ll be able to do only synchronous short jobs, (generally 30 seconds, except if you can modify it in the server config).

Yes, this is what I was looking for when I asked you to post the system information. Daniel’s right; your server’s host has blocked both functions Omeka S can use to execute a background script. If you can’t get your host to enable one of those functions, or switch servers/hosts, then you can’t run jobs in the background.

Awesome thanks guys. I’ll check in with my host.