Skip to main content

Installed Imagick error class 'Imagick' not found

Comments

3 comments

  • cPanelMichael
    Hello, Could you upload a PHPINFO file to the same directory of the script you are using to test the installation with to verify it uses the /opt/cpanel/ea-php56/root/etc/php.ini file? If not, you'd need to use the MultiPHP INI Editor in cPanel for this account to ensure "extension=imagick.so" is added. Thank you.
    0
  • neekfenwick
    Thanks cPanelMichael, I remain at a bit of a loss. I tested with phpinfo() already in that website, it shows:
    Loaded Configuration File /opt/cpanel/ea-php56/root/etc/php.ini
    I loaded MultiPHP INI Editor as you suggested, and found my 'extension=imagick.so' was the first line in the file for some reason. I moved it to below the 'Dynamic Extensions' comment in the file (around line 860) where it looked like it belonged, restarted apache server, but still got "Class 'Imagick' not found". phpinfo also shows me:
    extension_dir /opt/cpanel/ea-php56/root/usr/lib64/php/modules
    And 'locate imagick.so' shows:
    # locate imagick.so /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so
    So that looks good. As the ini file contains:
    ; If you only provide the name of the extension, PHP will look for it in its ; default extension directory.
    So just for completeness I tried specifying the full path to the .so:
    extension="/opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so"
    I also put a logging line in the actual script I'm running (called UploadFile.php) to be sure nothing in the bootstrap process of the cart I'm using is overwriting these settings other than what phpinfo() shows:
    [24-Jun-2017 03:19:52 UTC] modules include path: /opt/cpanel/ea-php56/root/usr/lib64/php/modules
    Seems fine. I'm going to google around more about how the 'Imagick' class is supposed to be made available to the PHP code. Is it enough to have the .so file on the extension_dir path, or is there some .php file required somewhere, like a C .h header file would be required as well as the .so? I cannot see any Imagick files in the include_path folder.
    include_path .:/opt/cpanel/ea-php56/root/usr/share/pear
    0
  • cPanelMichael
    Hello, Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look. Thank you.
    0

Please sign in to leave a comment.