• 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.

Issue Imagemagick issues on Server 2019

Kwasi

New Pleskian
I've installed ImageMagick on my Windows Server 2019, but can't seem to use it with any of the Plesk websites I've setup

ImageMagick is behaving a-ok when running commands in the command prompt window.

It appears individual vhost directories can't get to the ImageMagick directory and it's executables.
That's what I have been able to determine so far.

How would I be able to use it with individual websites setup via Plesk panel.

Never had a problem on way older versions of Plesk. Have a new server setup in motion now.

Thoughts?


THANKS
 
BTW I'm not using any pages with PHP so I have disabled it in "Hosting Settings" completely
I've never enabled PHP in my older servers with older versions of Plesk

I am however using a FastCGI application that a scripting package needs and has provided to me.
 
It seems if I install ImageMagick directly into vhosts/domainname.com/httpdocs I can get it to function as expected

Is there any harm to installing multiple copies of ImageMagick this way into multiple directories/setups Plesk will create???

I never had to do that when I had an older server 2012r2 and Plesk vers 12.something, but both were old and I'm pretty sure Server 2019 and Plesk Obsidian have much better security as a part of their setups currently.

What's sorta weird though is not being able to have ImageMagick and its functions available after doing a single install at the server level as administrator of the server for all users to use.

Thoughts???
 
Note: If you want ImageMagick extension to be shipped with Plesk, vote for this feature on Plesk UserVoice.

The solution provided below is risky as it can lead to incompatibility between PHP extension shipped with Plesk and ImageMagick core libraries.
It is also required to reboot the server.

Prerequisites​

To determine which version of ImageMagick should be used, run the following commands with the PHP, which will have this module installed (for demonstration purposes, Plesk PHP 7.1 will be used):
  1. Determine PHP architecture:
    Code:
    C:\> "%plesk_dir%\Additional\PleskPHP71\php.exe" -i | findstr "Architecture"
    Architecture => x64
  2. Check if PHP is thread-safe:
    Code:
    C:\> "%plesk_dir%\Additional\PleskPHP71\php.exe" -i | findstr "Thread Safety"
    Thread Safety => disabled

Installation​

  1. Download the ImageMagick archive with the version 6.9.3 with an appropriate architecture (x32 or x64) from php.net
  2. Unpack it to C:\ImageMagick.
  3. Download the latest stable PHP Imagick DLL from PECL repository, according to the thread safety and architecture of PHP;
  4. Copy the php_imagick.dll file into the %plesk_dir%Additional\PleskPHPxx\ext folder, where xx should be substituted by the desired PHP version;
  5. Copy all the CORE_RL_*.dll into the C:\ImageMagick\bin folder.
  6. Append the configuration file, %plesk_dir%Additional\PleskPHPxx\php.ini with the following entry:
    Code:
    extension=php_imagick.dll
  7. Prepend the PATH environmental variable in Control Panel > System and Security > System > Advanced system settings > Environment Variables > System variables > Path with the following value:
    Code:
    C:\ImageMagick\bin;
    Warning: Do not remove existing values from this variable.
  8. Grant IIS_IUSRS group with 'Read & Execute' permission to C:\ImageMagick and all subfolders and files;
  9. Recycle IIS Application Pools in Domains > example.com > Dedicated IIS Application Pool for Website > Recycle for all affected domains to load Imagick PHP module.
  10. Reboot the server

Verification​

If the ImageMagick is loaded correctly, the phpinfo page will have a imagick section with the correct amount of supported formats:

ImageMagick number of supported formats: 234

Note: To invoke the phpinfo page for a domain navigate to Domains > example.com > PHP Settings > View the phpinfo() page

WARNING: In case the installation causes problems, remove the files created on step 4 and remove the entry added on step 6.
 
OK, But since I'm not using PHP anywhere in any of my sites why would I be doing this exactly? Seems to be PHP related and not really a fan of anything someone refers to as "risky" ....
 
Anyone who wishes to try Imagick with PHP 8.0.20 here are the ammendements to IgorG post above that work with my current Plesk installation

Version 18.0.44 Update #3
PHP Version 8.0.20
Architecture: x64
Thread safety: Disabled

Ammendements
1/ Download from PECL the file "php_imagick-3.5.0-8.0-nts-vs16-x64";
2/ Right click on the zip file, choose "Properties" and then tick the box to "unblock" in the "Security" section at the bottom;
3/ Unpack as is to C:\php_imagick-3.5.0-8.0-nts-vs16-x64;
4/ Copy the php_imagick.dll file from this folder into the %plesk_dir%Additional\PleskPHPxx\ext folder, where xx should be substituted by the desired PHP version;
5/ Append the PHP configuration file from within Plesk, "Tools & Settings" --> Click on "8.0.20 FastCGI application" --> Click on "php.ini" tab with the following entry:
Code:
extension=imagick
6/ Prepend the PATH environmental variable in Control Panel > System and Security > System > Advanced system settings > Environment Variables > System variables > Path with the following value:
Code:
C:\php_imagick-3.5.0-8.0-nts-vs16-x64
7/ I did not need to add permissions to the folder
8/ Once this is in place, I simply went to the domain I want to test, switched PHP versions from 8.0.20 to 7.4.30 and then back to 8.0.20 and hey presto it works :)

I went through versions
php_imagick-3.7.0-8.0-nts-vs16-x64
php_imagick-3.6.0-8.0-nts-vs16-x64
php_imagick-3.5.1-8.0-nts-vs16-x64

until I found the working one

:D

Current latest version of "php_imagick-3.7.0-8.0-nts-vs16-x64" that is for PHP 8.1 does not work ....
 
Back
Top