lsphp74/bin/lsphp vs /php vs /php7.4 and WP-CLI

Colcol

New Member
#1
Hi

Newbie OLS user. Have to say the video guide linked to from here: https://openlitespeed.org/#install was superb. Thank you to whoever produced it. Up and running with three sites.

Now trying to understand the difference between lsphp, php and php7.4 in /usr/local/lsws/lsphp74/bin -- and what is best practice for their usage.

Video indicated to set the Command field to /usr/local/lsws/lsphp74/bin/lsphp for each virtual host. My cron jobs therefore also point to /lsphp and work fine.

Now installing WP CLI. After install, instructions say use php wp-cli.phar --info to verify the phar file works.

Command works with
php wp-cli.phar --info
/usr/local/lsws/lsphp74/bin/php wp-cli.phar --info
/usr/local/lsws/lsphp74/bin/php7.4 wp-cli.phar --info

But with /usr/local/lsws/lsphp74/bin/lsphp wp-cli.phar --info I get:
PHP Warning: Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in phar:///root/wp-cli.phar/vendor/wp-cli/wp-cli/php/utils.php on line 1057

So there is some difference between /lsphp and /php and /php.7.4. And I guess they all differ from the standard /usr/bin/php

I just wonder for WP CLI, what PHP binary should be used? I would have thought it best with OLS installed everything used the same LSWS PHP binary, but I am not an expert!

Any help appreciated.
 
Top