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

Enabling ImageMagick PECL Extension?

Discussion in 'Server Configuration and Hosting' started by MichaelDance, Jan 10, 2012.

  1. MichaelDance

    MichaelDance Well-Known Member

    After about 3 installation trys i believe i need to ask someone for assistance, i would like to use the ImageMagick on XenForo as its so much better, but i've tried many ways the best way so far was:

    yum install ImageMagick
    (pecl install imagick sometimes you may have ask to install gcc compiler. if so execute)

    yum install gcc
    usr/lib/php.ini
    add extension = "imagick.so"

    (Restart Apache by) service httpd restart

    I have Centos 5 on my server and running the latest cPanel.

    Thank you for any support.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. MichaelDance

    MichaelDance Well-Known Member

    Thanks Brogan i followed: http://xenforo.com/community/threads/help-to-install-imagemagick.24854/#post-302713

    but now the forums have a 500 internal error?

    My forums are: http://www.forum.varzu.co.uk/
    http://trivunetwork.co.uk/

    -------------------
    Updated: Downgraded to PHP 5.2.17 not 5.3.8 and now its working again not Error 500s

    But
    XenForo can make use of various different image processing libraries to produce image thumbnails etc. Select your preferred library from the list above.

    its still not selectable?
     
  4. steel_curtain

    steel_curtain Well-Known Member

    Is the imagick module enabled in phpinfo? You can check in the admin area of your forum by appending the URL with admin.php?tools/phpinfo

    If not, does the line you added to php.ini look like this?

    extension=imagick.so
     
    MichaelDance likes this.
  5. MichaelDance

    MichaelDance Well-Known Member

    http://www.forum.varzu.co.uk/admin.php?tools/phpinfo comes up white, i did turn off phpinfo so i turned it back on by removing:
    show_source, system, shell_exec, passthru, phpinfo, popen, proc_open, allow_url_fopen, ini_set from the Disabled_functions and turned my firewall and restarted Apache and it still was blank so im not sure so i put that back in to secure my server again.

    Core extension suhosin.so, imagick.so



     
  6. MichaelDance

    MichaelDance Well-Known Member

    My php ini file has:

    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
    zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.2.so"
    zend_extension = "/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"
    extension = "suhosin.so"
    extension = "imagick.so"
     
  7. steel_curtain

    steel_curtain Well-Known Member

    Try uploading this in a file and see what it says.

    Code:
    <?php
    if (!extension_loaded('imagick'))
        echo 'imagick not installed';
    else
        echo 'imagick installed';
    ?>
     
    MichaelDance likes this.
  8. MichaelDance

    MichaelDance Well-Known Member

    http://trivu.co.uk/mike.php

    Says: imagick not installed
     
  9. MichaelDance

    MichaelDance Well-Known Member

    Code:
    root@30005587 [~]# yum install ImageMagick
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.ellogroup.com
    * extras: mirror.ellogroup.com
    * updates: mirror.ellogroup.com
    base                                                                  | 1.1 kB    00:00 
    extras                                                                | 2.1 kB    00:00 
    updates                                                                | 1.9 kB    00:00 
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    Package ImageMagick-6.2.8.0-4.el5_5.3.x86_64 already installed and latest version
    Package ImageMagick-6.2.8.0-4.el5_5.3.i386 already installed and latest version
    Nothing to do
    root@30005587 [~]# yum install ImageMagick-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.ellogroup.com
    * extras: mirror.ellogroup.com
    * updates: mirror.ellogroup.com
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    Package ImageMagick-devel-6.2.8.0-4.el5_5.3.x86_64 already installed and latest version
    Package ImageMagick-devel-6.2.8.0-4.el5_5.3.i386 already installed and latest version
    Nothing to do
    root@30005587 [~]# yum install php-pear
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.ellogroup.com
    * extras: mirror.ellogroup.com
    * updates: mirror.ellogroup.com
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    No package php-pear available.
    Nothing to do
    root@30005587 [~]# mount -o,remount,rw,exec /var/tmp
    root@30005587 [~]# pecl install imagick
    pecl/imagick is already installed and is the same as the released version 3.0.1
    install failed
    root@30005587 [~]# mount -o,remount,rw,noexec /var/tmp
    root@30005587 [~]# 
    Very confused Michael here
     
  10. Deebs

    Deebs Well-Known Member

    That only installs the ImageMagick library for the OS, it is not the PHP package. Under Ubuntu the package is php5-imagick - ImageMagick module for php5.

    Try running the following:

    pecl install imagick
     
  11. MichaelDance

    MichaelDance Well-Known Member

    Im using Centos 5 will that still work mate?
     
  12. Deebs

    Deebs Well-Known Member

    It should, yes.
     
  13. MichaelDance

    MichaelDance Well-Known Member

    Code:
    root@30005587 [~]# pecl install imagick
    pecl/imagick is already installed and is the same as the released version 3.0.1
    install failed
    root@30005587 [~]# 
     
  14. steel_curtain

    steel_curtain Well-Known Member

    Check your error_log to see if there's any info to help sort this out.
     
  15. MichaelDance

    MichaelDance Well-Known Member

    No error logs have been made mate
     
  16. steel_curtain

    steel_curtain Well-Known Member

    Check for the file location. Run these commands.

    updatedb
    locate imagick.so
     
  17. Deebs

    Deebs Well-Known Member

    Ok,

    Depending on the version of PHP installed the following will be a different number but nevertheless it will still be there.

    cd /usr/lib/php
    ls -al
    it should list a few subdirectories, one will be a number. cd into that subdirectory.
    ls -al
    you should see a list of files ending in .so. Can you see one called imagick.so ??
     
  18. MichaelDance

    MichaelDance Well-Known Member

    Last login: Thu Jan 12 11:34:44 2012 from 94.*.***.218
    root@30005587 [~]# updatedb
    root@30005587 [~]# locate imagick.so
    /usr/local/lib/php/extensions/no-debug-non-zts-20090626/imagick.so
    /usr/local/src/imagick-2.2.2/.libs/imagick.so
    /usr/local/src/imagick-2.2.2/modules/imagick.so
    root@30005587 [~]#
     
  19. MichaelDance

    MichaelDance Well-Known Member

    Code:
    root@30005587 [~]# cd /usr/lib/php
    root@30005587 [/usr/lib/php]# ls -al
    total 168
    drwxr-xr-x 14 root root  4096 Dec 22 06:53 ./
    drwxr-xr-x 35 root root 20480 Jan 12 05:58 ../
    drwxr-xr-x  2 root root  4096 Dec 22 06:53 Archive/
    drwxr-xr-x  2 root root  4096 Jan 10 18:01 build/
    drwxr-xr-x  3 root root  4096 Dec 22 06:44 .channels/
    drwxr-xr-x  2 root root  4096 Dec 22 06:53 Console/
    drwxr-xr-x  4 root root  4096 Dec 22 06:44 data/
    -rw-r--r--  1 root root  2437 Dec 22 06:53 .depdb
    -rw-r--r--  1 root root    0 Dec 22 06:53 .depdblock
    drwxr-xr-x  6 root root  4096 Dec 22 06:44 doc/
    -rw-r--r--  1 root root  8827 Dec 22 06:53 .filemap
    -rw-r--r--  1 root root    0 Dec 22 06:53 .lock
    drwxr-xr-x  2 root root  4096 Dec 22 06:53 OS/
    drwxr-xr-x 11 root root  4096 Dec 22 06:53 PEAR/
    -rw-r--r--  1 root root  1087 Dec 22 06:53 PEAR5.php
    -rw-r--r--  1 root root 14424 Dec 22 06:53 pearcmd.php
    -rw-r--r--  1 root root 33897 Dec 22 06:53 PEAR.php
    -rw-r--r--  1 root root  922 Dec 22 06:53 peclcmd.php
    drwxr-xr-x  5 root root  4096 Dec 22 06:53 .registry/
    drwxr-xr-x  3 root root  4096 Dec 22 06:53 Structures/
    -rw-r--r--  1 root root 20243 Dec 22 06:53 System.php
    drwxr-xr-x  5 root root  4096 Dec 22 06:53 test/
    drwxr-xr-x  3 root root  4096 Dec 22 06:53 XML/
     
  20. Deebs

    Deebs Well-Known Member

    Hmm, can you give me a link to a script that will run phpinfo? (PM if you need to)
     

Share This Page