1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

imagick PECL extension

Discussion in 'Server Configuration and Hosting' started by Hornstar, Apr 27, 2014.

  1. Hornstar

    Hornstar Well-Known Member

  2. Chris D

    Chris D XenForo Developer Staff Member

  3. Slavik

    Slavik XenForo Moderator Staff Member

    You need to call Litespeeds PECL to do such installs: /usr/local/lsws/lsphp5/bin/pecl
     
  4. Hornstar

    Hornstar Well-Known Member

    So if I run this /usr/local/lsws/lsphp5/bin/pecl install imagick
    It will be all I need to do?
     
  5. Slavik

    Slavik XenForo Moderator Staff Member

    Yup
     
  6. Hornstar

    Hornstar Well-Known Member

    This is what I have got so far:
    upload_2014-4-27_21-48-57.png
     
  7. Tracy Perry

    Tracy Perry Well-Known Member

    Hit enter and hope that you have all the code necessary for a compile. On my Debian box I had to add some libraries in.
    Also, I don't know about LiteSpeed, but with OpenLiteSpeed I had to add the extension into the php.ini.
    Code:
    extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/imagick.so
     
    Adam Howard likes this.
  8. Hornstar

    Hornstar Well-Known Member

    Thanks, I just pressed enter, and this is what I got:
    upload_2014-4-28_6-53-32.png
    Looks like it has failed. If I now add the extension into php.ini will I need to do it again, or do something else?
     
  9. Slavik

    Slavik XenForo Moderator Staff Member

    yum install ImageMagick ImageMagick-devel


    then try again
     
    Hornstar likes this.
  10. Hornstar

    Hornstar Well-Known Member

    Thanks, I am now closer.

    upload_2014-4-28_8-4-1.png

    I can't seem to edit the php.ini file with the command I am using or I am searching for the wrong one.
     
  11. Slavik

    Slavik XenForo Moderator Staff Member

    open /usr/local/lsws/lsphp5/lib/php.ini and add extension=imagick.so to it.
     
    Hornstar likes this.
  12. Tracy Perry

    Tracy Perry Well-Known Member

    If it's like on Debian, you will need to either move the php.ini from /usr/local/lsws/php to /usr/local/lsws/lsphp5/lib or create a symlink to it.

    Then to add it I detailed what I had to do here.
    You also should go ahead and set your time zone in your php.ini.
     
  13. Hornstar

    Hornstar Well-Known Member

    I have made the change and gracefully restarted openlitespeed. I then went into attachments in the admincp and changed PHP built-in GD image library to ImageMagick PECL Extension. I now can't upload any attachments or avatars on the site. I click upload and then it just acts as if nothing was uploaded, and asks me to browse for a file. Any ideas?
     
    Last edited: Apr 28, 2014
  14. Tracy Perry

    Tracy Perry Well-Known Member

    I was going to give you a list of what I used to compile with (it works on my sites) but I forgot... I have access to the OLS panel restricted to my home IP and I'm down at a Dr. office imaging a VMware virtual machine and cannot get into it.
    I'll be home in about 1.5 hours (been down here 12 already) and if nobody has posted an update I'll relay mine.

    EDIT:
    Have you checked your php info page to make sure it is being loaded?
     
    Hornstar likes this.
  15. Slavik

    Slavik XenForo Moderator Staff Member


    If its not loaded XenForo won't let you select it :)
     
  16. Tracy Perry

    Tracy Perry Well-Known Member

    Yep, forgot about that... what can I say... brain is not hitting on all cylinders.
    98% of CPU cycles are being used to curse VMware. :p
     
  17. Hornstar

    Hornstar Well-Known Member

    Any ideas why it is loaded okay, but completely not working? I've switched back to the other method for now. But that means Gif images are being resized and broken.
     
  18. Tracy Perry

    Tracy Perry Well-Known Member

    You do have the actual ImageMagick executables installed correct?
     
  19. Hornstar

    Hornstar Well-Known Member

    Not sure. This is what I have done.

    1. yum install ImageMagick ImageMagick-devel
    2. /usr/local/lsws/lsphp5/bin/pecl install imagick
    3. Added extension=imagick.so to /usr/local/lsws/lsphp5/lib/php.ini
    4. Gracefully restarted openlitespeed.
     
  20. Tracy Perry

    Tracy Perry Well-Known Member

    That should have installed it then. Any errors in your OLS error log (/usr/local/lsws/DEFAULT/logs I believe is where they are on a default install and use of the default vhost).
     

Share This Page