Installing PHP extensions

The most commonly used extensions are available in our CentOS, Ubuntu and Debian repositories.

CentOS

To install an extension in CentOS, just execute the following command:

Change php55-imap for the PHP extension that you need. To search for extensions:

Ubuntu and Debian

The process is basically the same. Execute the following command:

Also, change php55-imap for the PHP extension that you need. To search for extensions:

Be sure to change php55 for the version of PHP you’re using (php54, php53, php52)

Extension not in our repositories?

Other extensions can be installed with PECL:

After this, you need to enable the extension by adding the configuration to php.ini which is usually located in /usr/local/lib/php.ini:

If you installed PHP from a package, the correct location would be /etc/php55/conf.d/zzz_custom.ini.

Finally, restart Apache via the Command Line (service apache2 restart or service httpd restart) or via the Control Panel.

Also, you could install extensions via phpize or via source. Refer to the extension installation instructions for further information.