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

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:
pecl install imagick-3.1.2
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:
yum install -y ImageMagick ImageMagick-devel
Hope that this helps and saves you time.
Recent Posts

How DigitalOcean Simplifies Cloud Computing for Developers
2023-01-18 12:35:28
How to Get Current Route Name in Laravel
2020-11-08 08:57:11
How to check the logs of running and crashed pods in Kubernetes?
2020-10-28 09:01:44
Top 10 VScode Shortcuts For Mac and Windows to Help You be More Productive
2020-10-28 07:12:51