imagick + additional php 7.2 version

Discussion in 'ISPConfig 3 Priority Support' started by ronee, Nov 12, 2019.

Tags:
  1. ronee

    ronee Member HowtoForge Supporter

    Hello all,
    We often use additional versions of php 7.1 or 7.2 using current versions of ispconfig 3.1 typically on Debian 8 or 9, compiled from source. This works fine.
    However, now we're attempting to install image magick with php 7.2, researching this we found only out of date info on this or recommendations on installing via apt-get etc. And it looks like there isn't a --enable option for Image Magick on building php 7.2.x (./configure options).
    Can anyway provide some advise on steps to include image magick in with php 7.2 built from source in this scenario? There are suggestions around the web for using pecl install and phpize but not sure if that's the right way to go.

    Much appreciated.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I have no more up to date details than what I've written in the PHP compile guides as I switched to the PHP packages from sury on my servers. If you find instructions on how to add it using pecl, then that should be fine in my opinion.
     
  3. ronee

    ronee Member HowtoForge Supporter

    ok thanks Till I'm installing using pecl on a debian 9 system with an additional version of php compiled in /opt/php-7.2.22/

    So I've proceeded as follows:
    root@xyzhost:/opt/php-7.2.22/bin# ./pecl install imagick
    WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
    downloading imagick-3.4.4.tgz ...
    Starting to download imagick-3.4.4.tgz (253,434 bytes)
    .....................................................done: 253,434 bytes
    19 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20170718
    Zend Module Api No: 20170718
    Zend Extension Api No: 320170718
    Please provide the prefix of ImageMagick installation [autodetect] :

    Question: I am thinking that since I want ImageMagick to be available to php 7.2 compiled in /opt/php-7.2.22 I need to provide a specific prefix, probably /opt/php-7.2.22/ would you agree?

    Much appreciated
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think so as you correctly used the pecl binary from the /opt/php-7.2.22/bin folder. I would just try to leave it at autodetect and see how it goes.
     
  5. ronee

    ronee Member HowtoForge Supporter

    Great much appreciated Till, this did end up working. I just had to first install ImageMagick dev components, not sure if both were needed but I ended up installing libmagickcore-dev and libmagick++-dev, without those two the pecl install failed with:

    checking for pkg-config... no
    pkg-config not found
    configure: error: Please reinstall the pkg-config distribution

    Once the two were installed autodetect on the prefix was fine and the pecl install succeeded, subsequently adding this to php.ini did successfully enable imagemagick:
    extension=imagick.so

    Posting back here in case it helps someone else.
     
    till likes this.

Share This Page