Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: exif and imagick installation

  1. #1
    Join Date
    Mar 2019
    Posts
    13

    exif and imagick installation

    Hello
    I have Custombuild 2 version 2090 and PHP versions 5.6, 7.1, 7.2 and 7.3 installed.

    Recently, after upgrading Wordpress to version 5.2, I see the following suggestions in site health tab:
    The optional module exif, is not installed or has been disabled.
    Warning The optional module imagick, is not installed, or has been disabled.

    How can I install/enable EXIF and imagick, for all installed PHP versions, by using custombuild 2 menu?

    Thank you and Kind Regards
    Elias

  2. #2
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    Wordpress does not need imagemick. You can also use GD for it, which is way easier to install.
    For Centos just use "yum install gd" and you're done.

    If you really want imagemick I believe it can be installed via pecl, but don't know how to do this for every php version you have. Somebody else may jump in here to help you with that.

    As for exif, you can have a look here:
    https://forum.directadmin.com/showthread.php?t=56855
    you have to do this for every php version used.
    Greetings, Richard.

  3. #3
    Join Date
    May 2008
    Location
    Bulgaria
    Posts
    970
    Sadly the upcoming Wordpress 5.2 have a "Health monitor" feature, which shows suggestions for better system and... one of the recommendations is to have Image Magick installed.

    It is not required for Wordpress to run normally; however I bet many customers of web hosting companies will ask about it.

    Regarding EXIF - add "--enable-exif" in the configure script and recompile php.

    Regarding image magick - you can install it using pecl.

    Code:
    cd /usr/local/php73/bin
    ./pecl install imagick
    Then add the extension to the php.ini file.
    Last edited by wattie; 05-10-2019 at 12:23 AM.

  4. #4
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    one of the recommendations
    A recommendation is not a requirement. Does this healthmonitor not work with GD?

    I'm just curious of how it works without Image Magick or what's the benefit of installing this compared to GD for this feature. And how does one update this when installed with pecl?
    Because this might be interesting too for us.

    Regarding EXIF better use the link I posted because you better create a custom configure script otherwise it will be overwritten by the next php update.
    Greetings, Richard.

  5. #5
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,750
    - Imagick vs GD in WordPress
    Last Updated - March 26, 2019 02:52
    https://support.pagely.com/hc/en-us/...D-in-WordPress
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  6. #6
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    Thank you Alex.
    However, the WordPress core media.php file defaults to GD as its image editor of choice.
    And then I read this about the new health feature in Wordpress 5.2:
    Media Handling: Active editor, ImageMagick version number, string, resource limits, GD version, Ghostscript version.
    Where did you read about the recommendation Wattie?
    Greetings, Richard.

  7. #7
    Join Date
    Jul 2013
    Posts
    198
    The way that wattie said it did not work for me, lot of errors because i had disabled some php functions
    here is the way i did it with php 7.2 - centos 7:
    Code:
    Check on http://pecl.php.net/package/imagick for latest Imagick stable version
     
    yum install ImageMagick ImageMagick-devel -y
    
    wget http://pecl.php.net/get/imagick-3.4.4.tgz
    tar -zxf imagick-3.4.4.tgz
    cd imagick-3.4.4
    /usr/local/php72/bin/phpize
    ./configure --with-php-config=/usr/local/php72/bin/php-config
    make
    make install
    
    Now add to your php.ini (in my case /usr/local/php72/lib/php.ini):
    
    extension=imagick.so
    
    My php is php-fpm so I restart php-fpm process:
    
    service php-fpm72 restart

  8. #8
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,130
    imagick=yes/no is now a CB 2.0 option from rev. 2109 (defaults to "no"). exif is the default for ~3 weeks. Thank you!
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  9. #9
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    So imagick can now by default be build from custombuild? Great, thank you!
    Greetings, Richard.

  10. #10
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    8,130
    Not by default, as it's disabled by default, but yes, it can be built, it's as easy as:
    Code:
    cd /usr/local/directadmin/custombuild
    ./build update
    ./build set imagick yes
    ./build imagick
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  11. #11
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    Yes that's what I meant with "by default", that you can let CB take care of it now.
    Thank you.
    Greetings, Richard.

  12. #12
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    322
    Thanks for implementing it into CB!

  13. #13
    Join Date
    May 2008
    Location
    Bulgaria
    Posts
    970
    Quote Originally Posted by Richard G View Post
    Where did you read about the recommendation Wattie?
    Sorry for the late reply. If you go to any wordpress site in /wp-admin/site-health.php you will see the recommendation which suggests installing image magick.

    I don't like image magick at all

  14. #14
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    Thanks Wattie, I already discovered that in the meantime.

    But it's just a recommendation, it's not really needed for Wordpress as it works great with GD too.
    I don't like Imagick either, but since it can be easily installed via Custombuild, I use it too. If it hadn't be available via Custombuild, good chance I'd not implemented it at all.
    Greetings, Richard.

  15. #15
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    322
    I tried installing it once before too. Gave up on it.

  16. #16
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    1,191
    Just installed Imagick through CB. What I noticed it that it doesn't add extension="imagick.so" to the php.ini(s). Without it, it won't work (maybe that was the thing missing for those above who could not get it to work).
    ~ Arieh

  17. #17
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    Does it need to be in there? I installed imagick on 2 servers via custombuild and it's working, but not present in php.ini as extension either.
    Also showing up in phpinfo.php files. That's on Centos 7.

    Are you experiencing your issue on Centos too?
    Greetings, Richard.

  18. #18
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    1,191
    I think the extension needs to be in the php.ini. Did you check the right php.ini (as there are many usually).

    In custombuild I do see

    perl -pi -e 's|^extension=imagick.so|;extension=imagick.so|' ${EXTENSION_INT_PHP_INI}

    and

    echo "extension=imagick.so" >> ${EXTENSION_INT_EXT_INI}

    So at some point it will insert it. But it didn't do it for mine.

    It's a Debian 8 box.
    ~ Arieh

  19. #19
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    4,183
    I think the extension needs to be in the php.ini. Did you check the right php.ini (as there are many usually).
    Directadmin only uses /usr/local/lib/php.ini on Centos servers, however on our newly installed Centos 7 server that is also the only one present from DA, there are 2 others from plugins which do not contain it either:
    Code:
    [root@server24: ~]# locate php.ini
    /usr/local/directadmin/plugins/softaculous/php.ini
    /usr/local/lib/php.ini
    /usr/local/mediacp/php/php.ini
    [root@server24: ~]# cat /usr/local/directadmin/plugins/softaculous/php.ini | grep imagick
    [root@server24: ~]# cat /usr/local/lib/php.ini | grep imagick                               
    [root@server24: ~]# cat /usr/local/mediacp/php/php.ini | grep imagick             
    [root@server24: ~]#
    I also checked inside the DA php.ini just to be sure.

    So if it should be added (due to that line) it's not added on Centos 7, but it is visible in a phpinfo.php file.

    I do see this however:
    Code:
    /usr/local/lib/php/extensions/no-debug-non-zts-20170718/imagick.so
    The extension dir is not enabled but maybe it's loaded because it's present in this extension directory? Or do you have it present there also on Debian 8?
    Greetings, Richard.

  20. #20
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    1,191
    I used 2 php versions of which 1 mod_php and 2 php-fpm. For mod_php I already had imagick installed. When running ./build imagick, as far I could see it build imagick for my php-fpm version.

    I then added the .so linking in /usr/local/php73/lib/php.ini

    Well, maybe it's because of the different PHP versions and methods. Either way it may just be a recommendation to try if imagick isn't working.
    ~ Arieh

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •