Bobby's Blog

Install ImageMagick on CentOS / cPanel/WHM for an Older PHP Version 5.3

imagic-bobby-iliev

The standard way of installing any PHP pecl extension would be to run pecl install NAME-OF-EXT .

However this does not always work for some outdated PHP version. This is due to the fact that pecl would try to download and install the newest version of the extension that you are trying to install.

In our case PHP 5.3 would not work with the newest imagick release and you would get an error that the extension requires a newer PHP version.

What you would need to do in this case is to go to http://pecl.php.net/ and check which version is compatible with your PHP installation.

In our case we could go ahead and run the following:

This would basically install Imagick 3.1.2 which is compatible with the PHP 5.3 version.

This applies for any other pecl extension that you would like to install on an older PHP version.

If you get an error during the compilation you would need to install the following:

Hope that this helps and saves you time.

About the author

Bobby

Linux System Administrator