Invalid PHP path on XAMPP

I am running Omeka-s via XAMMP localhost on my PC.

When I try to run the CSVImport module I get the same error: Omeka\Job\Exception\RuntimeException: PHP-CLI error: invalid PHP path.

I have checked phpinfo and my PHP path is “\xampp\php”. I have tried the local.config.php file with:
‘phpcli_path’ => ‘\xampp\php’, and ‘phpcli_path’ => ‘/xampp/php’, Neither of these work.

I have searched everything I can think of in the forum and Google, and tried all sorts of different syntax for the phpcli_path in local.config.php but no luck.

Any suggestions would be appreciated so I can get the CSVImport to work

This is the error log:

2019-09-21T21:55:42+00:00 ERR (3): Omeka\Job\Exception\RuntimeException: PHP-CLI error: invalid PHP path. in D:\xampp\htdocs\omeka\application\src\Job\DispatchStrategy\PhpCli.php:57
Stack trace:
#0 D:\xampp\htdocs\omeka\application\src\Job\Dispatcher.php(105): Omeka\Job\DispatchStrategy\PhpCli->send(Object(Omeka\Entity\Job))
#1 D:\xampp\htdocs\omeka\application\src\Job\Dispatcher.php(91): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\PhpCli))
#2 D:\xampp\htdocs\omeka\modules\CSVImport\src\Controller\IndexController.php(152): Omeka\Job\Dispatcher->dispatch(‘CSVImport\Job\I…’, Array)
#3 D:\xampp\htdocs\omeka\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(78): CSVImport\Controller\IndexController->mapAction()
#4 D:\xampp\htdocs\omeka\vendor\zendframework\zend-eventmanager\src\EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#5 D:\xampp\htdocs\omeka\vendor\zendframework\zend-eventmanager\src\EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#6 D:\xampp\htdocs\omeka\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(104): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#7 D:\xampp\htdocs\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 D:\xampp\htdocs\omeka\vendor\zendframework\zend-eventmanager\src\EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#9 D:\xampp\htdocs\omeka\vendor\zendframework\zend-eventmanager\src\EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 D:\xampp\htdocs\omeka\vendor\zendframework\zend-mvc\src\Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#11 D:\xampp\htdocs\omeka\index.php(21): Zend\Mvc\Application->run()
#12 {main}

I experience the exact same problem as @Busman412, does someone have any idea ?


The path you’ve written there doesn’t look like a Windows path: it should start with c: or something like that.

One thing to keep in mind is that our support is really focused on the Linux platform: at a minimum you’re going to find it harder to get answers to your questions here if you’re running on Windows.

Hi Rossant,

After days and days of searching I’ve finally found a solution for Xammp/Localhost/CSVImport!
CSVImport et php-cli

Add this line to the ‘service_manager’ section of local.config.php:
‘Omeka\Job\DispatchStrategy’ => ‘Omeka\Job\DispatchStrategy\Synchronous’,

I tried it with a small csv test file and it worked, then I tried it with a CSV with over 4,000 items. It was working but stopped at a timeout, so I had to edit my php.ini and change the “max_execution_time”.

Then I tried to add media and a thumbnail to one of the items I imported. Crashed again but I found this solution: Thumbnails are not generated

changed my local.config.php file settings from:
‘Omeka\File\Thumbnailer’ => ‘Omeka\File\Thumbnailer\ImageMagick’,
‘Omeka\File\Thumbnailer’ => ‘Omeka\File\Thumbnailer\Imagick’,

Have fun!

PS: Here is my local.config:

return [
    'logger' => [
        'log' => true,
        'priority' => \Zend\Log\Logger::INFO,
    'http_client' => [
        'sslcapath' => null,
        'sslcafile' => null,
    'cli' => [
        'phpcli_path' => null,
    'thumbnails' => [
        'types' => [
            'large' => ['constraint' => 800],
            'medium' => ['constraint' => 200],
            'square' => ['constraint' => 200],
        'thumbnailer_options' => [
            'imagemagick_dir' => null,
    'translator' => [
        'locale' => 'en_US',
    'service_manager' => [
        'aliases' => [
            'Omeka\File\Store' => 'Omeka\File\Store\Local',
            'Omeka\File\Thumbnailer' => 'Omeka\File\Thumbnailer\Imagick',
	    'Omeka\Job\DispatchStrategy' => 'Omeka\Job\DispatchStrategy\Synchronous',

and here is the test data (save as a csv file):

Dublin Core:Title, Dublin Core:Creator, Dublin Core:Description, tags, Item Type Metadata:URL
"Walden", "Henry David Thoreau", "A man seeks simplicity.", "book, classic, New England", ","
"The Count of Monte Cristo", "Alexandre Dumas", "A man seeks revenge.", "book, classic, France", ""
"Narrative of the Life of Frederick Douglass", "Frederick Douglass", "A man seeks freedom.", "book, classic, Maryland", ""

Thanks jflatnes.

Yep, it is a Windows path. I use Xampp on my Windows PC as a test bed for lots of applications, databases, photo galleries, family history databases etc. Then I upload them to my paid web host, which is on a Linux platform.

I had the same problem as tounoki in this post - I can’t have access to php-cli on the web host:
CSVImport et php-cli

Looks like the same thing happens with Xampp - no access to php-cli

I haven’t had too many problems with all the other PHP applications I use, but the php-cli took a while to sort out (see my reply to Rossant).




Well, Synchronous avoids PHP-CLI entirely, but your jobs will not run in the background. So you’re limited to what can finish in the space of a single web request. That can work out fine for small workloads, or not so fine for bigger ones.

As for your paths, my basic advice from earlier in the thread still applies: none of the paths you said you tried appear to be actual absolute Windows paths as all are missing the drive letter.