Imagick missing - version php 7.3

Nextcloud version (eg, 12.0.2): 15.0.4
Operating system and version (eg, Ubuntu 17.04): debian 9 stretch
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.3
PHP version (eg, 7.1): 7.3.1

The issue you are facing: Nextcloud is missing PHP imagick.

Is this the first time you’ve seen this error? (Y/N): Y

I need some assistance to get imagick for PHP 7.3 and no idea how to get it installed. Can find it for version 7 and beneath but not for 7.3. Any idea how to get it installed?

Kind regards
//neph

I hope you have access to the command line on your Ubuntu system? This command should do:

sudo apt install php-imagick

The package is not dependent of the PHP version.

4 Likes

Hej

yes, I have.

pi@nextcloud:~ $ sudo apt-get install php-imagick
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fonts-droid-fallback fonts-noto-mono ghostscript gsfonts imagemagick-6-common libavahi-client3 libcups2 libcupsfilters1 libcupsimage2 libfftw3-double3
  libgs9 libgs9-common libijs-0.35 libjbig2dec0 liblcms2-2 liblqr-1-0 libltdl7 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libopenjp2-7 libpaper-utils
  libpaper1 php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-phpdbg php7.0-readline poppler-data ttf-dejavu-core
Suggested packages:
  fonts-noto ghostscript-x cups-common libfftw3-bin libfftw3-dev liblcms2-utils libmagickcore-6.q16-3-extra php-pear poppler-utils fonts-japanese-mincho
  | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-nanum
The following NEW packages will be installed:
  fonts-droid-fallback fonts-noto-mono ghostscript gsfonts imagemagick-6-common libavahi-client3 libcups2 libcupsfilters1 libcupsimage2 libfftw3-double3
  libgs9 libgs9-common libijs-0.35 libjbig2dec0 liblcms2-2 liblqr-1-0 libltdl7 libmagickcore-6.q16-3 libmagickwand-6.q16-3 libopenjp2-7 libpaper-utils
  libpaper1 php-imagick php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-phpdbg php7.0-readline poppler-data ttf-dejavu-core
0 upgraded, 31 newly installed, 0 to remove and 75 not upgraded.
Need to get 20.3 MB of archives.
After this operation, 69.3 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Looks to me, if I proceed I will install al lot of stuff that I don’t “need”. Will this bring the server into trouble when I want to use php version 7.3 but modules of 7.0 are installed as well?

Kind regards
//neph

Those php dependencies are strange, but should not cause problems. php 7.0 is installed in a different subfolder, so the 7.3 version stays the same. The other packages are ok, I have them on my server too. I did a apt remove on all php7.0 packages after the 7.3 runs fine.

Well, I installed as shown above. But Nextcloud still shows this:

How can I get rid of this message?

Kind regards
//neph

You are sure your nextcloud runs on PHP 7.3?

Hej

yes, I am. Based on that informations…

pi@andrews_nextcloud:~ $ php -v
PHP 7.3.1-3 (cli) (built: Feb  5 2019 10:25:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.1-3, Copyright (c) 1999-2018, by Zend Technologies
pi@andrews_nextcloud:~ $

grafik

Kind regards
//neph

To be sure what version your web server is using, follow this guide:
https://docs.nextcloud.com/server/stable/admin_manual/issues/general_troubleshooting.html?highlight=phpinfo

You will need to know your PHP version and configurations. To do this, create a plain-text file named phpinfo.php and place it in your Web root, for example /var/www/html/phpinfo.php . (Your Web root may be in a different location; your Linux distribution documentation will tell you where.) This file contains just this line:

<?php phpinfo(); ?>

Open this file in a Web browser by pointing your browser to
<your nextcloud url>/phpinfo.php

Hej hej

I did as advised but cannot call the page.

I placed the phpinfo.php to /var/www/nextcloud/ and called https://sub.domain.de/phpinfo.php but were always redirected to login page or any other page I entered within NC.

-rw-r--r--  1 www-data www-data    20 Feb 22 18:07 phpinfo.php
<?php
phpinfo();
?>

Am I doing something wrong?

Kind regards
//neph

Got required information:

Pls find file here

Hey guys. There already exist discussions about that this module is outdated and has security vulnerabilities and should not be used anymore. I never found what exactly what it is used for in Nextcloud, but the warning only shows up when the theming app is enabled.

So simply disable the theming app (as long as you anyway go with default theme) and get rid of the warning.

Not sure about the hassle on the PHP version at it is clearly PHP7.3 as shown by php -v and on Nextcloud web UI. No need to check via phpinfo.php…
To install (if really required) the app try:
apt install php7.3-imagick

If that does not exist, then the source (whichever it was) where you installed PHP7.3 from does not ship this app, perhaps for a good reason :wink:. Although Ondrej ships it for all PHP versions: https://launchpad.net/~ondrej/+archive/ubuntu/php/+index?batch=75&direction=backwards&memo=150&start=75

4 Likes

I have the same problem on my raspi. Updated to php 7.3 with this info: https://janw.me/2019/installing-php7-3-rapsberry-pi/

Nextcloud now says it’s missing

It’s not found on the buster repo. What’s the correct way to get this module for php7.3 on the raspi with buster repo?

As above:

  • If you don’t use theming, disable the theming app instead.
  • If you use theming, ignore the warning.

If you do not want to follow my recommendation or you exactly know what you/Nextcloud needs this module for and you require this feature, then:

  • Indeed strange that on Raspbian Buster, the php-imagick package is the PHP7.2 vesion:

    2019-05-25 15:45:20 root@micha:/tmp# apt search php-imagick
    Sorting... Done
    Full Text Search... Done
    php-imagick/testing 3.4.3-4 armhf
      Provides a wrapper to the ImageMagick library
    
    2019-05-25 15:45:48 root@micha:/tmp# apt show php-imagick
    Package: php-imagick
    Version: 3.4.3-4
    Priority: optional
    Section: php
    Maintainer: Debian PHP PECL Maintainers <team+php-pecl@tracker.debian.org>
    Installed-Size: 362 kB
    Provides: php7.2-imagick
    Depends: php-common (>= 1:7.0+33~), phpapi-20170718, libc6 (>= 2.4), libmagickcore-6.q16-6 (>= 8:6.9.10.2), libmagickwand-6.q16-6 (>= 8:6.9.10.2)
    
  • On Debian Buster that is correctly PHP7.3: https://packages.debian.org/buster/php-imagick

  • Not the first time that Raspbian had some inconsistencies in their Buster repo. I’m running my RPi on Raspbian Buster since Stretch became stable and I regularly ran into such, also missing dependencies and sometimes critical ones so that an apt-get dist-upgrade would have removed half of my system :smile:.

  • If for whatever reason you still want to install the module, you need to compile it from source. See e.g.: https://howto.biapy.com/en/debian-gnu-linux/servers/php/install-the-php-extension-imagick-on-debian
    The “Manual” part. It’s a bid outdated, of course use the PHP7 commands/paths but the basic steps should be still true.

2 Likes

I run my NextCloud on Raspberry Pi, too. Indeed, the buster channel only provides imagick for php7.2 currently.

Disabling theming did the trick. :slight_smile:
Thank you.

Faced the same issue and found this thread. Well, tbh I was just to lazy to check all that php version stuff… so as a Linux veteran (haha), I know that in most cases some support modules need the main application as well.
So I checked if the main app imagemagick was installed as a dependency of php-imagick and it wasn’t (weird somehow). Installed it, rebooted NextCloud, logged into the web interface again and voilà - works. Thumbs are now created by imagemagick, message has gone. No disabling of theming or anything - still theming is enabled here. Maybe that will help someone who finds this thread the way I did.

Just install those two with dependencies and you should be good to go:
sudo apt-get install imagemagick php-imagick

Proof:

3 Likes

I’ve got the same problem after upgrded my server to Ubuntu 18.04.3. My Nextcloud instance use PHP 7.3 and I’ve already installed imagemagick php-imagick modules as suggested by @Captain_Jellyfish but it still doesn’t work. It seems that my PHP doesn’t load the magick module. I use Theming and I would like to fix it. Any suggestions?

You Sir, are a gentleman and you saved my day from a disaster! Thank you!!:slightly_smiling_face:

Greetings,
so, I have the same issue still today. NC 17.xxx
I do have theming and I wish to keep the login theme I changed (rather than the default one).
The questions:

  1. should I just ignore the warning? could ignore leade to more issues in future time?
  2. Adding the dependencies as mentioned above, would safely solve the problem? (now and future)
    Thanks
    kattivius

sudo apt-get install imagemagick php-imagick

I had to reboot the server (apache reload was not removing the warning)