Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add php-imagick dependencies #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rrelmy
Copy link

@rrelmy rrelmy commented Jun 22, 2017

Please wait with merging

Problem

I tracked down the error I get from the php-imagick extension

$ php -i
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Benutzer\remy\scoop\apps\php7.1-imagick\current\php_imagick.dll' - Das angegebene Modul wurde nicht gefunden.
 in Unknown on line 0
// ...

It is because imagick depends on the correct imagemagick installation.
Hint, the imagemagick package from scoop core does not work ;-)

Solution

The correct version has to be grabbed from http://windows.php.net/downloads/pecl/deps/
Unpacked somewhere and the bin directory has to be added to the PATH and a new environment variable MAGICK_HOME.
Then php-imagick loads correctly.

Problem

Adding the imagemagick dependency to the $PATH overwrites the core imagemagick installation if present and could lead to problems if it is installed …

@r15ch13 do you have an idea how to solve this?

this could clash with the core imagemagick installation because it adds
itself to the path!

It has to be in the path that the extension works correctly
@r15ch13
Copy link
Contributor

r15ch13 commented Jun 30, 2017

Does it work with ImageMagick version 6.9.8-10?
The scoop version is already on version 7.0.6-0.

Is it just me or does the version change if www. is added to the URL?
https://imagemagick.org/script/download.php (6.9.8-10)
https://www.imagemagick.org/script/download.php (7.0.6-0)

@nueko
Copy link
Collaborator

nueko commented Jun 30, 2017

the version change if www. is added to the URL?

@r15ch13 here is same

@rrelmy
Copy link
Author

rrelmy commented Jun 30, 2017

Same here for the version difference on the webpage

@r15ch13 php 7.1.6 is compiled against imagemagick 6.9.3-7. Using a newer release does not work,

PHP Warning:  Version warning: Imagick was compiled against Image Magick version 1683 but version 1688 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

Warning: Version warning: Imagick was compiled against Image Magick version 1683 but version 1688 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

I tried it with ImageMagick-6.9.8-10-Q8-x64-dll.exe, only the -dll releases include the required DLLs


The DLL files from the old imagemagick version have to be in the PATH.
MAGICK_HOME doesn't seem to be required.

What about deleting all the .exe files from the php-imagick installation so they do not interfere with other imagemagick installations?

@r15ch13
Copy link
Contributor

r15ch13 commented Jun 30, 2017

What if the ImageMagick DLLs are placed in the same directory as php_imagick.dll? Shouldn't they have a higher priority than the DLLs in PATH.

@rrelmy
Copy link
Author

rrelmy commented Jun 30, 2017

No, they would need to be placed along the php.exe

@rrelmy
Copy link
Author

rrelmy commented Jul 20, 2017

I added the post_install script described in #2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants