How to enable CLI version of PHP on CentOS
Posted on 2009-02-16
I have a dedicated server running CentOs with Plesk. It has PHP version 4.3.9.
I need to enable the CLI version of PHP to support one of my clients websites. According to the PHP docs, this version of PHP should have CLI support enabled by default, unless it is disabled in the configure settings when built. I have checked my configure output in phpinfo and it is not disabled, however the script to test for the CLI fails.
Could it be disabled somewhere else? Do I need to install another PHP somewhere else to act as PHP CLI, separate from my existing PHP web server?
Doing a full download and compile is not an option - apparently it could break the Plesk install.
I have tried installing another PHP (4.4.9) in a separate dir (usr/bin/php_cli) but when I do php -v I get a load of errors, followed by:
PHP 4.4.9 (cgi) (built: Feb 16 2009 20:17:55)
However phpinfo in a browser still says 4.3.9.
I am worried about screwing this up completely, which is bad as the box is in use by many clients websites. Any advice appreciated.