imagick for PHP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

imagick for PHP

Postby DrSeussFreak » 28. November 2016 18:00

I am unable to install imagick, but I cannot get PHP to recognize the dll. I followed the instructions from http://hrt0kmt.hatenablog.com/entry/2015/05/27/170608, but everytimg I check "php -m" I get

Code: Select all
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll' - The specified module could not be found. in Unknown on line 0


Just wondering if any knows how to install this on Windows 10 x64. I did install the x86 dll for PHP, due to Xamp being 32bit
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby Nobbie » 28. November 2016 21:13

DrSeussFreak wrote:I followed the instructions from http://hrt0kmt.hatenablog.com/entry/2015/05/27/170608


Does that match your environment? This is taken from above:

Windows7
32bit OS
XAMPP v3.2.1


You are running Windows7, also running Xampp v3.2.1?
Nobbie
 
Posts: 9423
Joined: 09. March 2008 13:04

Re: imagick for PHP

Postby DrSeussFreak » 29. November 2016 05:33

Windows 10 Pro (64-bit)
xampp-win32-5.6.28-0-VC11-installer.exe (3.2.2)

See above. I tried the steps listed in that blog a few days ago, no luck.
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby Nobbie » 29. November 2016 12:00

The problem is, that you copied a third party DLL (php_imagick.dll) from "somewhere" into the Xampp PHP folder. DLLs requires certain environments and you cannot simply mix DLLs freely together. This DLL has to fit to the Xampp PHP Installation and it also needs a Microsoft Runtime Library (which comes with the compiler, that has been used in order to build that DLL) on your PC, otherwise it would not load. Just as it is the case.

My problem: i have no idea, how this DLL has been build and therefore i have no idea, if it fits to your Xampp installation and if also have no idea, which runtime library is required. It is on you to find it out and eventually to install a runtime library from Microsoft on your PC. These libraries are called "Microsoft Visual C++ Redistributable Package (x86)" and they exist in many flavours (according to the release, like "Microsoft Visual C++ 2010 Redistributable Package (x86)" (see the 2010 in the name) and similar. Maybe you can find further informations in the Apache error_log, try to start Apache from the Xampp Panel and then open the error_log and watch out for corresponding error messages.
Nobbie
 
Posts: 9423
Joined: 09. March 2008 13:04

Re: imagick for PHP

Postby DrSeussFreak » 29. November 2016 15:30

I was reviewing logs very carefully, and could not find any corresponding entries, outside of the dll error. Ok, I will figure something else out, thanks.
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby robinflyhigh » 06. December 2016 13:23

I am having the exact same issue. Tried all 32-bit version from http://imagemagick.org/script/binary-releases.php#windows and used the DLL from http://pecl.php.net/package/imagick

Spent hours in fixing it but no avail. Please let me know if you find any solution. I will also keep trying.
robinflyhigh
 
Posts: 3
Joined: 06. December 2016 13:20
XAMPP version: 3.2.2
Operating System: Windows 10

Re: imagick for PHP

Postby DrSeussFreak » 06. December 2016 16:58

I was able to find a solution, take a look at https://github.com/nZEDb/nZEDb/wiki/install-Guide:-Windows, I posted my steps there, the quick and dirty is below

Download the latest x86, Q16*DLL version of ImageMagick from http://www.imagemagick.org/script/binary-releases.php#windows, and install into "C:\ImageMagick" checking "Install Legacy Utilites" as well as "add to path" (nothing else is needed). Add a new System Variable "MAGICK_HOME" with the path of "C:\ImageMagick\modules\coders". Also copy all the files from "C:\ImageMagick\modules\coders" and "C:\ImageMagick\modules\filters" to "C:\wamp\bin\apache\apache2.4.23\bin".

Download the latest TS (Thread Safe) version of http://www.peewit.fr/imagick/, that matches your PHP version (in my case 5.6). Extract the folder and move "php_imagick.dll" to "C:\wamp\bin\php\php5.6.25\ext".

Reboot to make sure that the new variable and path updates take effect. If everything worked as planned, from a command line you should be able to run "convert" and if you get a list of all the ImageMagick flags, you are set, if not, re-check your set-up, as you will have issues later on.

Edit "C:\wamp\bin\apache\apache2.4.23\conf" and add 'SetEnv MAGICK_HOME C:/ImageMagick/modules/coders/` to the very end of the file.
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby robinflyhigh » 06. December 2016 19:55

Thanks for your response. I forgot to mention that we are using XAMPP and not WAMP.

But the above steps did not solve the problem. My PHP Version is 5.6.28
robinflyhigh
 
Posts: 3
Joined: 06. December 2016 13:20
XAMPP version: 3.2.2
Operating System: Windows 10

Re: imagick for PHP

Postby DrSeussFreak » 06. December 2016 19:57

I switched to WAMP after exhausting all efforts on XAMPP
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby robinflyhigh » 06. December 2016 21:04

Hey, I just solved it but using php_imagick-3.4.1-5.6-ts-vc11-x86.zip from http://windows.php.net/downloads/pecl/releases/imagick/3.4.1/

and

ImageMagick-6.9.3-7-vc11-x64.zip from http://windows.php.net/downloads/pecl/deps/
robinflyhigh
 
Posts: 3
Joined: 06. December 2016 13:20
XAMPP version: 3.2.2
Operating System: Windows 10

Re: imagick for PHP

Postby DrSeussFreak » 06. December 2016 21:05

good to know, I will keep that in mind if I go back to XAMPP :)
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby DrSeussFreak » 14. December 2016 17:34

robinflyhigh wrote:Hey, I just solved it but using php_imagick-3.4.1-5.6-ts-vc11-x86.zip from http://windows.php.net/downloads/pecl/releases/imagick/3.4.1/

and

ImageMagick-6.9.3-7-vc11-x64.zip from http://windows.php.net/downloads/pecl/deps/


I switched back to XAMPP to play around, and when I run "php -m" I get

Code: Select all
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll' - The specified module could not be found.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll' - The specified module could not be found.
 in Unknown on line 0


yet in phpinfo I see the imagick extension listed. Are you seeing this as well?
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro

Re: imagick for PHP

Postby DrSeussFreak » 14. December 2016 17:53

Got it, needed the 32bit version, not 64.
DrSeussFreak
 
Posts: 8
Joined: 28. November 2016 17:13
XAMPP version: 3.2.2
Operating System: Windows 10 Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 24 guests

cron