• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!

Forwarded to devs ImageMagick 6.9.13-25 breaks PDF reading

pleskpanel

Regular Pleskian
Username:

TITLE

ImageMagick 6.9.13-25 breaks PDF reading

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

AlmaLinux 9.5 (Teal Serval), Plesk Obsidian 18.0.68 Update #2

PROBLEM DESCRIPTION

Latest release of ImageMagick 6.9.13-25 updated via YUM breaks PDF reading and returns an error. This is the stock version that comes from the EPEL library.

STEPS TO REPRODUCE

Try running a PHP script to read anything about a PDF file:

Code:
$pdfMain = new \Imagick( dirname(__FILE__) . '/test.pdf' );
    $numberPages = $pdfMain->getNumberImages();

    printf( '<pre>%1$s</pre>', print_r( $numberPages, 1 ) );
    die( 'end' );

ACTUAL RESULT

Fatal error: Uncaught ImagickException: Failed to read the file

EXPECTED RESULT

Should read a PDF file

ANY ADDITIONAL INFORMATION

  • Bug started with latest release of ImageMagick 6.9.13-25
  • Checked that there were no custom exceptions set in the policy xml file
  • Attempted to add a manual PDF coder read|write policy and following a full server restart, to no avail
  • No other ImageMagick versions installed
  • Attempted removing/reinstalling both GhostScript as well as ImageMagick (all default settings) via YUM as these worked until the latest release

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Thank you for the update and confirmation. I believe this won't be classified as a Plesk bug as EPEL is considered third-party repository. Nevertheless, I forwarded the report for further review by our engineers and I will provide more details as soon as possible.
 
Owh wow, i thought i was the only 1, i have the excact same problem, alle my sites stopped working with PDF feature of imagick.

how can i fix this, revert this version quickly?
yesterday the problems keep coming from my customers, yes i have auto update plesk enabled.


[***@*** ~]$ rpm -q ImageMagick
ImageMagick-6.9.13.25-1.el8.x86_64
 
The latest Plesk PHP package appears to include ImageMagick 3.8.0 for PHP 8.1-8.4 however there is a caveat and that is to use it, the EPEL one must be removed via yum.

PHP Updates​

14 April 2025

  • Updated PHP 8.4 to version 8.4.6.
  • Updated PHP 8.3 to version 8.3.20.

Linux​

  • Updated Imagick to version 3.8.0 for PHP 8.1-8.4.
  • Updated AVIF to version 1.2.1 for PHP 8.1-8.4.
  • Updated Redis to version 6.2.0 for PHP 8.1-8.4.
  • Set Plesk as PHP_BUILD_PROVIDER for PHP 8.1-8.4.

So running the following command should remove EPEL's ImageMagick:

Code:
# yum remove ImageMagick

Once the process is complete, PHP will see these values:

ImageMagick version number 1693
ImageMagick version string ImageMagick 6.9.13-10 Q16 x86_64 18376 ImageMagick – Mastering Digital Image Alchemy (legacy)
Imagick version 3.8.0

At that time, PDF reading/writing should resume without having to modify any policy.xml files.

No further information from Plesk appears to be available at the time of writing this update so hopefully a confirmation that this is indeed the correct approach is forthcoming.

The downside with this is that any websites less than PHP 8.1 will not be able to use ImageMagick unless the EPEL version is installed again which then breaks PDF reading.
 
@pleskpanel Thanks for this info.

Unfortunately this doesn't seem to work with AlmaLinux 8.10. After removing the EPEL-Package and updating Plesk PHP uses the new module, but reading any PDF still fails.
 
Back
Top