How To Compile PHP extensions in Cloudlinux

The full process for php 5.X would be:

1. download and unpack extension, cd into it’s directory

2. execute our version of phpize for necessary:


3. execute configure with our binary:

./configure –with-php-config=/opt/alt/php5X/usr/bin/php-config

4. make the .so file:


5. copy it to modules directory (on 32bit server, use usr/lib/php/modules)

cp -rp modules/*.so /opt/alt/php5X/usr/lib64/php/modules/

6. add ini file for module to /opt/alt/php5X/etc/php.d.all

7. register new alt-php version with:

$ cagefsctl –setup-cl-selector


eLite Server Management

We Specialize In cPanel Server Management
Affordable 24/7 Technical Support Company

Leave a Reply