I have spent the last day Googling this, and either my Google-Fu is having a bad day or no-one has asked this before.
These past couple of days I have been setting up a Vagrant VM with CentOS 6.8 for me to work on our website. I decided to install the same packages which are on our live server: Nginx, PHP-FPM & Percona. I removed PHP 5.3 and enabled 5.6 in the remi repo and currently have installed:
php indexer.php reindexall
Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p ] [-g ] [-c ] [-d foo[=bar]] [-y ] [-D] [-F [-O]]
-c | Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-h This help
-i PHP information
-m Show compiled in modules
-v Version number
Specify alternative prefix path to FastCGI process manager (default: /usr).
Specify the PID file location.
Specify alternative path to FastCGI process manager config file.
-t, --test Test FPM configuration and exit
-D, --daemonize force to run in background, and ignore daemonize option from config file
force to stay in foreground, and ignore daemonize option from config file
force output to stderr in nodaemonize even if stderr is not a TTY
Allow pool to run as root (disabled by default)
PHP 5.6.25 (fpm-fcgi)
PHP 5.6.25 (cli)
Try using the full path to the desired PHP executable. Something like:
/usr/bin/php indexer.php reindexall