Adding custom PHP modules

February 4, 2020 February 4, 2020

You can install custom PHP modules to your existing ClusterCS setup in two ways:

1. Using pecl, by using the executable found in all PHP version installs:

/opt/php-VERSION/bin/pecl install “module”

2. Compiling the module manually – usually done by running four commands after downloading and unzipping the package (Please follow the instructions provided by the module’s author if possible):

/opt/php-VERSION/bin/phpize
./configure –with-php-config=/opt/php-VERSION/bin/php-config
make
make install

After installing the module, add it to the current configuration by creating a new file in: /opt/php-VERSION/etc/conf.d/extra-modules.ini and add a new line:

extension=module-name.so

Reload / Restart the services depending on your setup:

service nginx restart
service httpd reload
service php-fpm restart

* Replace VERSION with the PHP version you are working on.

54