Reputation: 11
It seem that I don't have imagemagick package installed. My confusion is how does my php imagick work without Imagemagick installed? I thought the two work in tandem as requirement as imagick is only a PHP api.
root@se /usr/share/doc # dpkg --get-selections | grep imagemagick
imagemagick-6-common install
root@se /usr/share/doc # dpkg --get-selections | grep imagick
plesk-php73-imagick install
plesk-php74-imagick install
root@se /usr/share/doc # dpkg -L imagemagick-6-common
/.
/etc
/etc/ImageMagick-6
/etc/ImageMagick-6/coder.xml
/etc/ImageMagick-6/colors.xml
/etc/ImageMagick-6/delegates.xml
/etc/ImageMagick-6/log.xml
/etc/ImageMagick-6/magic.xml
/etc/ImageMagick-6/mime.xml
/etc/ImageMagick-6/policy.xml
/etc/ImageMagick-6/quantization-table.xml
/etc/ImageMagick-6/thresholds.xml
/etc/ImageMagick-6/type-apple.xml
/etc/ImageMagick-6/type-dejavu.xml
/etc/ImageMagick-6/type-ghostscript.xml
/etc/ImageMagick-6/type-windows.xml
/etc/ImageMagick-6/type.xml
/usr
/usr/share
/usr/share/ImageMagick-6
/usr/share/ImageMagick-6/english.xml
/usr/share/ImageMagick-6/francais.xml
/usr/share/ImageMagick-6/locale.xml
/usr/share/bug
/usr/share/bug/imagemagick-6-common
/usr/share/bug/imagemagick-6-common/presubj
/usr/share/bug/imagemagick-6-common/script
/usr/share/doc
/usr/share/doc/imagemagick-6-common
/usr/share/doc/imagemagick-6-common/NEWS.Debian.gz
/usr/share/doc/imagemagick-6-common/README.Debian
/usr/share/doc/imagemagick-6-common/README.txt.gz
/usr/share/doc/imagemagick-6-common/TODO.Debian
/usr/share/doc/imagemagick-6-common/changelog.Debian.gz
/usr/share/doc/imagemagick-6-common/copyright
/usr/share/doc/imagemagick-6-common/html
/usr/share/doc/imagemagick-6-common/html/README
Upvotes: 0
Views: 872
Reputation: 24419
PHP's Imagick
extension binds MagickWand
library -- which is a C-API to MagickCore
library. On many distros, MagickWand & MagickCore libraries can be installed without the common CLI utility (e.g. magick
, convert
, display
&tc).
You can review all the libraries linkled by running ldd
on imagick.so
.
$ ldd /usr/lib64/php/modules/imagick.so
linux-vdso.so.1 (0x00007fffe7fea000)
libgomp.so.1 => /lib64/libgomp.so.1 (0x00007faa2c6b5000)
libMagickWand-6.Q16.so.7 => /lib64/libMagickWand-6.Q16.so.7 (0x00007faa2c588000)
libMagickCore-6.Q16.so.7 => /lib64/libMagickCore-6.Q16.so.7 (0x00007faa2c2af000)
libc.so.6 => /lib64/libc.so.6 (0x00007faa2c0a5000)
...
Upvotes: 1
Reputation: 53081
Imagick uses ImageMagick. Imagick is an API that makes calls to ImageMagick. So when you install Imagick, either it will install ImageMagick for you or you have to install ImageMagick first. See
https://www.php.net/manual/en/book.imagick.php
You can check if ImageMagick is installed by checking the version:
<?php
exec("convert -version",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>
or you can search to see if installed and where:
<?php
echo "<pre>";
system("which -a convert");
echo "</pre>";
?>
If you think you have ImageMagick 7, then try
<?php
exec("magick -version",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>
and/or
<?php
echo "<pre>";
system("which -a magick");
echo "</pre>";
?>
You should also check your Imagick info at
<?php phpinfo(); ?>
Upvotes: 1