Install imagick in PHP 5.5. and 5.6 with EasyApache 4

syedmaz

Registered
Apr 24, 2014
2
0
1
cPanel Access Level
Reseller Owner
In my case I am using EasyApache 4 and PHP 5.6 and was unable to install imagick.

# tail /home/domainname/public_html/error_log
PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

pecl install imagick
was giving error for php-devel module and phpize
Can't find PHP headers in /opt/cpanel/ea-php56/root/usr/include/php


Ran "yum install ea-php56-php-devel" and managed to install the php-devel successfully (Make sure install relevant php devel)

Ran "pecl install imagick" successfully

All good.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
pecl install imagick
was giving error for php-devel module and phpize
Can't find PHP headers in /opt/cpanel/ea-php56/root/usr/include/php
Hello,

Ensure you use the correct PECL binary associated with the version of PHP you are installing the module for. For instance, the path for PHP 5.6 is:

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl
Thank you.
 
  • Like
Reactions: eva2000