Author Topic: Add modules with PHP selector  (Read 260 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
Add modules with PHP selector
« on: July 30, 2018, 10:00:21 AM »
Hi,

my main version of the PHP of the panel is 7.2.7 ... For several reasons I have to use a version of PHP 5.6 that I installed with the PHP selector, but I need to add modules such as redis, memcached and other. ..

How can I do that?!?

Thanks in advance!

BR
Venty

Offline
*
Re: Add modules with PHP selector
« Reply #1 on: July 30, 2018, 01:41:36 PM »
you can do that custom after php build, you can check how php switch has this in the folder

/usr/local/cwpsrv/htdocs/resources/conf/php_switcher/external_modules/
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
***
Re: Add modules with PHP selector
« Reply #2 on: July 30, 2018, 04:56:12 PM »
Hi,

We are talking about PHP selector , not about PHP switcher...
File redis and memcached are in the folder:

/usr/local/cwpsrv/htdocs/resources/conf/php_switcher/external_modules/

 but are not listed in the installed modules of the PHP  version 5.6 installed by the PHP selector...???

BR
Venty

Offline
***
Re: Add modules with PHP selector
« Reply #3 on: July 31, 2018, 04:43:01 PM »
:)

Offline
*
Re: Add modules with PHP selector
« Reply #4 on: August 01, 2018, 11:51:37 AM »
you can check php switcher scripts and modify it to build php-selector php versions...note you need to know what to edit...so it's not for a beginner....anyway any system admin can do that or if you have no system admin then cwp support.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
***
Re: Add modules with PHP selector
« Reply #5 on: August 01, 2018, 05:26:11 PM »
Hi,

PHP selector where?

BR
Venty

Offline
*
Re: Add modules with PHP selector
« Reply #6 on: August 02, 2018, 01:31:52 PM »
you need to check eternal_modules of the php switcher so you would know how to modify the scripts to work with php selector..
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
***
Re: Add modules with PHP selector
« Reply #7 on: August 03, 2018, 11:59:23 AM »
Hi,

Adding modules can not be done before compiling the given version of the PHP by the PHP selector to select the appropriate menu Edith flag ( go to PHP flag editor), set the:

--enable-memcached
--enable-redis

save the changes, and then start the compilation???

Thanks in advance!

BR
Venty

Offline
***
Re: Add modules with PHP selector
« Reply #8 on: August 07, 2018, 05:39:24 PM »
???

Offline
****
Re: Add modules with PHP selector
« Reply #9 on: August 08, 2018, 01:30:56 AM »
Why dont you manually install the modules you need?

Offline
****
Re: Add modules with PHP selector
« Reply #10 on: August 08, 2018, 02:07:49 AM »
Like if you have php5.6 as your alternate php version. The paths are as below.

Code: [Select]
/opt/alt/php56/usr/bin/php
/opt/alt/php56/usr/bin/pecl
/opt/alt/php56/usr/bin/php-config
/opt/alt/php56/usr/bin/phpize
/opt/alt/php56/usr/php/php.ini

So to install redis to it, i will do

Code: [Select]
/opt/alt/php56/usr/bin/pecl install redis
Now enable its module in your phpini

Code: [Select]
echo "extension=redis.so" >> /opt/alt/php56/usr/php/php.ini
Check if module is loaded

Code: [Select]
[root@cwp7 ~]# /opt/alt/php56/usr/bin/php -i | grep redis
redis
Registered save handlers => files user redis rediscluster
This program is free software; you can redistribute it and/or modify


Your can replace php56 with the version you have installed. Like if you have 7.1 use php71. So in that case path of your files will be

Code: [Select]
/opt/alt/php71/usr/bin/php
/opt/alt/php71/usr/bin/pecl
/opt/alt/php71/usr/bin/php-config
/opt/alt/php71/usr/bin/phpize
/opt/alt/php71/usr/php/php.ini