Issue with PHP in terminal (LiteSpeed OpenSource/CentOS)

Hi! Thanks for enter and read for help.

I have a server 2.3 over : CentOS Linux 7 (Core), my web server is OpenLiteSpeed 1.7.16. all the websites use PHP and all is working good.

My fist issue is that I have try to run composer as 7.3 but the server default was 8.0, I try fist from: How to Change CLI PHP on CyberPanel? - CyberPanel

/usr/local/lsws/lsphp73/bin/php composer

And this fail, I have try:

ln -s /usr/bin/php /usr/local/lsws/lsphp73/bin/php

but I get:

ln: failed to access ‘/usr/local/lsws/lsphp73/bin/php’: Too many levels of symbolic links
I try

Rm /usr/bin/php

And :

ln -s /usr/bin/php /usr/local/lsws/lsphp73/bin/php

but I can´t pas this issue, and the new issue is now php command die, if I try to run:

php -v

I get:
-bash: php: command not found

please some help will be cool to recover the php funcion over my server and know how run composer as 7.3

thanks for all, alex

Have a look here on how it’s done with PHP 8.1 :slight_smile:

Php 8.1 error in INSTALL PHP EXTENSIONS - Support and Discussion / General Discussion - CyberPanel Community