Author Topic: how to change cwp php version via command line  (Read 7966 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
how to change cwp php version via command line
« on: July 18, 2021, 09:01:41 PM »
hey guys,
i have changed my php version to 8 and now i have serious error with Ioncube loader, The loader fails to start and now admin panel is out of access returning this error : "No Loader is installed, please try to run this command or contact support: sh /scripts/update_ioncube restart", i tried to fix ioncube loader problem but no chances...now i need to change default php version to 7.3 that is installed befor.please help me do that from terminal and command line.

Offline
*
Re: how to change cwp php version via command line
« Reply #1 on: July 19, 2021, 05:32:41 PM »
Unfortunately there is no routin method to solve this problem and after reviewing many forums and posts and guidences i Solved This Problem in this method :
Problem Resolution:
1- installed php v8 on cwp and changed server`s main php version from php switcher to 8
2- activated ioncube loader from php module list.
cwp admin panel and all the hosts and websites went down and out of rich showing this message :
"No Loader is installed, please try to run this command or contact support: sh /scripts/update_ioncube restart"
then i tried to fix ioncube loader problem and updated to the last version and many other actions but the problem did`nt solved. because there where no any php v8 compatible ioncube loader configuration file.
my best practice to solve the problem :
1- i tried php -v to find out current running  of php on my server :
Code: [Select]
php -vthe result was php v8.0.8 so i decided delet all installed php versions on the server and reinstall them to fix this issue :
A-find out all installed php versions on server:
Code: [Select]
yum list installed | grep phpShowed up :
cwp-suphp.x86_64                     0.7.2-3                         @cwp
cwpphp.x86_64                        7.2.30-3                        @cwp

B- Removed all installed php packages via :
Code: [Select]
sudo yum remove --setopt=clean_requirements_on_remove=1 php php-pear php-mysql php-cli php-common mod-phpalso :
Code: [Select]
yum remove cwp-suphp.x86_64and :
Code: [Select]
yum remove cwpphp.x86_64then i Rebooted the server and and checked admin panel in browser then i faced "502 Bad Gateway Error.
C: Reinstalled cwpphp.x86_64 via :
Code: [Select]
yum install cwp-suphp.x86_64and
Code: [Select]
yum install cwp-suphp.x86_64Rebooted server again and everything was fixed and i was able to login to admin panel and remove PHP v8 from php switcher and reinstall php-fpm versions.


Offline
*
Re: how to change cwp php version via command line
« Reply #2 on: July 22, 2021, 07:19:35 PM »
Report a Problem :
PHP Selector and PHP FPM keeps loading in User Host managment panel when you try to select installed php versions for php selector.
when i select a domain and try to select php version from list, selector Stocks on Loading State...
Any Suggestions?