Skip to main content

Install imagick in PHP 5.5. and 5.6 with EasyApache 4

Comments

5 comments

  • JacobPerkins
    Hi, In the PECL binary, you can simply remove the '-n' from the binary itself:
    root@i-0000cbca [~]# diff /usr/local/bin/pecl pecl 28c28 < exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_ar gv="On" $INCDIR/peclcmd.php "$@" --- > exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv= "On" $INCDIR/peclcmd.php "$@"
    This will allow you to use the PECL binary from the command line. You should be able to install those modules after making this change :D Let me know how it goes. Thanks!
    0
  • did-vmonroig
    Thanks for your help. With your change PECL seems to work:
    # pecl install imagick . . . Build process completed successfully Installing '/usr/local/include/php/ext/imagick/php_imagick_shared.h' Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/imagick.so' install ok: channel://pecl.php.net/imagick-3.3.0 Extension imagick enabled in php.ini
    But this server uses EasyApache 4, so extension hasn't been enabled for webs, as it uses another PHP.INI. I've copied library from /usr/local/lib/php/extensions/no-debug-non-zts-20090626/imagick.so to /opt/cpanel/ea-php55/root/usr/lib64/php/modules/ and created /opt/cpanel/ea-php55/root/etc/php.d/imagick.ini, with this content:
    ; Enable imagick extension module extension=imagick.so
    After an httpd restart, this is the new problem:
    PHP Warning: PHP Startup: imagick: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20121212 These options need to match in Unknown on line 0
    0
  • did-vmonroig
    Just for the record, I couln't manage to recompile properly imagick. Reverted back to EasyApache 3 and I'll be far from it while it's work in progress. Our clients will have to wait for multihome PHP.
    0
  • MastricX
    Removed the -n in /usr/local/bin/pecl pecl config-set bin_dir /opt/cpanel/ea-php56/root/usr/bin/ pecl config-set php_bin /opt/cpanel/ea-php56/root/usr/bin/php pecl config-set php_ini /opt/cpanel/ea-php56/root/etc/php.ini pecl install imagick Helped me build the correct API version.
    0
  • cPanelMichael
    Helped me build the correct API version.

    Hello, I'm happy to see that solution worked well. Thank you for updating this thread with the outcome.
    0

Please sign in to leave a comment.