So I’m getting the error that other have had. But when I check my hosting they inform me that:
Path to PHP
If I add this info the the config.ini
background.php.path = “/usr/local/bin/php-cli”
background.php.path = “/usr/local/bin/php”
I still get the php-cli path error.
I have multiple hosting services. So I tried this on both services, different path depending on the hosting service, and I’m getting the error on both sites.
RuntimeException: The configured PHP path (/usr/local/bin/php) does not point to a PHP-CLI binary.
If I run php -v from the path I see that php is indeed there 7.2.31 (cli)
Am I missing something?
I’ve tried everything and can’t get it to work. Tried setting every conceivable path, adding symlinks, setting CLI in bash, etc…
Zip. I can’t get it to work.
In general, all you should have to do is find the path to the PHP CLI binary, and set that path as the value of
background.php.path in application/config/config.ini.
@jscott What’s the full, exact output of running the command
/usr/local/bin/php -v on these servers? @DavidGhedini, same question with whatever the relevant path on your server.
I ended up doing this to avoid the php-cli
jobs.dispatcher.default = "Omeka_Job_Dispatcher_Adapter_Synchronous"
jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_BackgroundProcess"
jobs.dispatcher.longRunning setting to also be
Then ran the importer with only 10 rows and just did multiple imports
The error you posted gets thrown when we try to execute that
-v command and the output doesn’t look like
Yours does look normal, how we’d expect. I’m thinking the issue here may be instead something like the relevant functions PHP uses to run commands (here,
exec) simply being disabled. It’s not hugely uncommon for web hosts to disable
exec and other similar functions.
I am currently hosting Omeka on Godaddy for anyone that stumbles upon this in the future.
Thanks for the reply.
I am getting the issue when trying to generate Reports.
The output from php -v is:
PHP 7.2.31 (cli) (built: Jun 30 2020 02:57:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Which is what is expected.
background.php.path, I’ve tried using:
I’ve also tried:
- Setting an alias via bash profile/rc
- Changing the PHP version to rule our compile errors for CLI
It seems no matter value I provide, the error persists.
OS is CentOS 7.x
Figured this out. It was a disabled exec function in php-fpm function:
php_admin_value[disable_functions] = passthru,shell_exec,system
Thanks again and hope above helps someone else.
This topic was automatically closed after 250 days. New replies are no longer allowed.