• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Plesk with ImageMagick 7.X from OS on Ubuntu 20.04

n0fear

Basic Pleskian
Username:

TITLE

Plesk with ImageMagick 7.X from OS on Ubuntu 20.04

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian v18.0.57_build1800231122.14 os_Ubuntu 20.04

PROBLEM DESCRIPTION

The imagemagik version coming with ubuntu 20.04 is a old version from 2019. For a project i need conversion from SVG to png, jgg and pdf. The version on ubuntu does not support svg at all. Installing libmagickcore-6.q16-6-extra as told in another thread here adds svg support, BUT the converted images are broken after that - all the lines are super bold instead of thin for example.

So I updated my imagemagik from sources to the latest 7.x version and as the version check on the server shows this worked:

:~# convert --version
Version: ImageMagick 7.1.1-21 Q16-HDRI x86_64 dcffc2de3:20231021 ImageMagick

However even plesk writes it uses the OS version of image magic on all php versions, it does not! It looks like plesk is depending on this packages:

plesk-php82-imagick
plesk-php80-imagick
plesk-php74-imagick

for the different php versions. And those packages depend on imagemagick-6-common and other versiopn 6 packages. So without the plesk-php82-imagick package there seams to be no connection from php 8.2 to imagemagick at all. with the package plesk uses the old version and shows ImageMagick 6.9.10-23 Q16 x86_64 20190101 in phpinfo page.

can i fix this myself sowehow and install a php imagick version that works with my 7+ libary?

on a "normal server" the instruction is according to GitHub - Imagick/imagick: The Imagick PHP extension:

git clone GitHub - Imagick/imagick: The Imagick PHP extension
cd imagick
phpize && ./configure
make
make install
You will also need to add extension=imagick.so to your PHP ini file to make PHP load the extension."

but i dont know what exactly those plesk-phpXX-imagick packages do, and i could not find any information.... can i remove them and do the steps above to add my "own" php imagick pack to php with the php ini? or are the plesk ones needed?

STEPS TO REPRODUCE

Update ImageMagic Libary on OS fopr example with this script/doc check what libary version OS uses with convert --version = 7.1.1-21

check what version is uses with phpinfo.php = ImageMagick 6.9.10-23 Q16 x86_64 20190101

ACTUAL RESULT

Script not working correctly with old version, plesk using not thje OS Version but an old one because plesk-php82-imagick depends on 6.X version

EXPECTED RESULT

Plesk using new Version from OS

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Help with sorting out
 
ImageMagick and the PHP Imagick are two different things. Imagick is the PHP extension to manipulate images through PHP scripts. Image Magick is a command line utility to manipulate images using command line commands.
 
ImageMagick and the PHP Imagick are two different things. Imagick is the PHP extension to manipulate images through PHP scripts. Image Magick is a command line utility to manipulate images using command line commands.
Thanks peter, but PHP Imagick depends on the ImageMagick Libary or better to say uses that for using imagemagick in php, not? i could get it to work with using PHP Handler for OS for this single subscription. Adding extension=imagick.so to php.ini everything works. But i really would like to use the plek php versions
 
@Peter Debik i could get it to work, i just uninstalled plesk-php82-imagick package. And copied the compiled imagick.so module to the /opt/plesk/php/8.2./lib/php/modules folder. Restarted apache and it works, phpinfo shows 7.X version now. However, i dont know if this new imagick.so will be overwritten by some plek update and if this was the correct way. Maybe you or any other could give me some information for that
 
An update on this. Plesk still tryes to install its old imagemagic lib and php. i i protected the file, it could not, is there any way to prevent plesk from doing this?

Reading state information...
Suggested packages:
libmagickcore-6.q16-6-extra
The following NEW packages will be installed:
imagemagick-6-common libmagickcore-6.q16-6 libmagickwand-6.q16-6
plesk-php74-imagick plesk-php82-imagick
N: Ignoring file 'plesk.list.ai_back' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
0 upgraded, 5 newly installed, 0 to remove and 14 not upgraded.
Need to get 0 B/2198 kB of archives.
After this operation, 9981 kB of additional disk space will be used.
Selecting previously unselected package imagemagick-6-common.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 253153 files and directories currently installed.)
Preparing to unpack .../imagemagick-6-common_8%3a6.9.10.23+dfsg-2.1ubuntu11.9_all.deb ...
Unpacking imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu11.9) ...
Selecting previously unselected package libmagickcore-6.q16-6:amd64.
Preparing to unpack .../libmagickcore-6.q16-6_8%3a6.9.10.23+dfsg-2.1ubuntu11.9_amd64.deb ...
Unpacking libmagickcore-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu11.9) ...
Selecting previously unselected package libmagickwand-6.q16-6:amd64.
Preparing to unpack .../libmagickwand-6.q16-6_8%3a6.9.10.23+dfsg-2.1ubuntu11.9_amd64.deb ...
Unpacking libmagickwand-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu11.9) ...
Selecting previously unselected package plesk-php74-imagick.
Preparing to unpack .../plesk-php74-imagick_3.7.0-ubuntu.20.04.221109.0743_amd64.deb ...
Unpacking plesk-php74-imagick (3.7.0-ubuntu.20.04.221109.0743) ...
Selecting previously unselected package plesk-php82-imagick.
Preparing to unpack .../plesk-php82-imagick_3.7.0-ubuntu.20.04.231027.0940_amd64.deb ...
Unpacking plesk-php82-imagick (3.7.0-ubuntu.20.04.231027.0940) ...
dpkg: error processing archive /var/cache/apt/archives/plesk-php82-imagick_3.7.0-ubuntu.20.04.231027.0940_amd64.deb (--unpack):
unable to make backup link of './opt/plesk/php/8.2/lib/php/modules/imagick.so' before installing new version: Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/plesk-php82-imagick_3.7.0-ubuntu.20.04.231027.0940_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Launching component and product checkers...
Downloading file report-update: 0%
Downloading file report-update: 100% was finished.
Downloading file pool/PSA_18.0.57_13314/examiners/py_launcher.sh: 0%
Downloading file pool/PSA_18.0.57_13314/examiners/py_launcher.sh: 100% was finished.

ERROR: An error occurred on attempt to install packages.
Attention! Your software might be inoperable.
Visit https://support.plesk.com/ to search for a solution.
 
Solution / Workaround:

Install Imagamagic latest to havew the libs for building

GitHub - SoftCreatR/imei: IMEI - ImageMagick Easy Install

Install Imagick latest

GitHub - Imagick/imagick: The Imagick PHP extension

Add another imagick_x.so to plesk. Example for php 8.2
  1. Connect to the server via SSH
  2. Create a backup of the current imagick.so file (just in case):
    cp /opt/plesk/php/8.2/lib/php/modules/imagick.so /root/imagick_backup.so
  3. Rename .so file so that it is not replaced during updates:
    # mv /opt/plesk/php/8.2/lib/php/modules/imagick.so /opt/plesk/php/8.2/lib/php/modules/imagick_new.so
  4. Execute the following command to add the extension:
    # echo "extension=imagick_new.so" > /opt/plesk/php/8.2/etc/php.d/imagick.ini
Now all my QR codes are build like they should
 
Back
Top