Omeka 2.5 exception 'RuntimeException' with message 'The configured PHP path (/usr/bin/php) does not point to a PHP-CLI binary

I am following all directions for getting the pdftotext plugin to work, but when I tell it to scan all existing pdfs, I receive the following:

exception ‘RuntimeException’ with message ‘The configured PHP path (/usr/bin/php) does not point to a PHP-CLI binary.’

I’ve verified that /usr/bin/php is valid; what else can I do?

What gets output when you run /usr/bin/php -v on your server? The error message you quoted is what you get when there’s something at /usr/bin/php but the output doesn’t look like what we’re expecting.

$ php -v
PHP 5.5.9-1ubuntu4.21 (cli) (built: Feb 9 2017 20:54:58)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright © 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright © 1999-2014, by Zend Technologies

Just to make sure: you ran php -v . Is the output the same when you run /usr/bin/php -v ?

Yes, identical output. I hope we can figure this out!

The output definitely looks right.

Here’s something to consider: maybe PHP’s exec function is disabled? Some shared hosts like to do that to try to stop their users from executing other programs. The PHP setting is disable_functions or you can check with your host if you have one.