Ispmanager 6 lite, pro, host documentation

Install a PHP extension manually


This method is not applicable for installing PHP extensions in CloudLinux.

Native PHP version

Execute the command below to install an extension for the native PHP version:


yum install <package name>


apt install <package name>

Alternative PHP version

You can install an extension for the alternative PHP version:

  • using the package manager Pecl;
  • from the source code.

Install an extension using the package manager Pecl

Extension installation example:

  1. Install the packages:


    yum install autoconf gcc zlib-devel


    apt install autoconf gcc zlib1g-dev
    Additional packages may be required when you install other extensions.
  2. Install the extension:
    /opt/<PHP version directory>/bin/pecl install <extension name>
  3. Connect the extension for a required PHP version:
    echo extension=<extension name> >> /opt/<PHP version directory>/etc/php.d/<extension name>.ini
    For example:
    echo >> /opt/<PHP version directory>/etc/php.d/<extension name>.ini

Install from the source code

Let's install env as an example::

  1. Download and extract the archive with the extension source code:
    cd /tmp
    wget -O env.tar.gz
    tar xzvf env.tar.gz
    cd env-0.2.1/
  2. Run the configuration and setup process:
    /opt/<version directory PHP>/bin/phpize
    ./configure --with-php-config=/opt/<PHP version directory>/bin/php-config && make && make install
  3. Enable the extension globally for the required PHP version:
    echo '' > /opt/<PHP version directory>/etc/php.d/20-env.ini
The extension setup process may require additional packages that are not described in this article.