Page 1 of 1

Version problem Imagick & ImageMagick

Posted: 2014-02-11T07:07:26-07:00
by jeffreyg
I'm having a problem with letting both Imagick & ImageMagick working both on my computer. its either one of them working but never both of them. I used these steps to get it working: viewtopic.php?f=18&t=24673

For some reason I can't find the right match in version.

I got a local Xampp server on a Windows 7 Ultimate 32-bit system. It has PHP 5.4.7 on it with MSVC9 Compiler. (Looked those things up in my php.ini and its the right one). Xampp is installed in the E:/ folder (E:/xampp).

1. I installed ImageMagick version 6.8.8.1 by using the .dll.exe 6.8.8.1-Q16-x86.dll.exe and I got it from here: http://ftp.sunet.se/pub/multimedia/grap ... /binaries/. (The reason why I picked this one, is because this one is an .exe file). I installed it in the xampp folder: E:/xampp/ImageMagick

2. After the installation I can use the exec(); command in my php code (htdocs) which is working like a charm.

Code: Select all

exec("convert -strip -units PixelsPerInch  inputs.jpg -resample 100 -set density 100 savedimage/output.jpg", $return);
3. I downloaded Imagick for PHP 5.4 and put the php_imagick.dll in the php/ext/ folder. (E:/xampp/php/ext/) After that I enabled it in my php.ini with extension=php_imagick.dll. Then I rebooted my system. Download location: http://pecl.php.net/package/imagick/3.1.2/windows

4. When I started checking with the following code:

Code: Select all

  if (!extension_loaded('Imagick')) {
        echo "Its not there.";
  }
  
  else {
		echo "Its there.";
  }
I received the last echo: "Its not there.", so I copied all the other .dll files into the E:/xampp/ImageMagick folder. From that moment on I got the echo: "Its there."

5. When I tried to execute the exec(); from above there was no output. So I checked the version again and it said: 6.8.8.4.

Ofcourse the question remains why I want both to work. I know a bit how ImageMagick works but I need Imagick as image library for CodeIgniter. So by having both on my computer I can do some testing and try to get the same output with Imagick and ImageMagick.

My question is: is there a way to make them both work together or find a matching Imagick - ImageMagick? And how should I install it to get them both working?

Re: Version problem Imagick & ImageMagick

Posted: 2014-02-11T08:28:31-07:00
by Bonzo
Yes they will both work together as I had them working on a XAMPP setup a few years ago.

There was a problem with Imagick and php 5.4 -> everytime somebody visited a page on my website it generated and error and by the time I found there was a very large error log.

I have just tried installing Imagick again after not being able to get it to work for a couple of years with php 5.5 I do not get the errors I had before where Apache would not start but for some reason php will not find it.

I know not much help but Imagick and Windows is a problem.

Re: Version problem Imagick & ImageMagick

Posted: 2014-02-11T08:58:22-07:00
by jeffreyg
Yeah so it seems.. I used pretty much every search term I knew on both google and these forums to find a good solution to get them both working. All thats left that I can find are purple google links with dead-ends. Thanks anyway for your reply. I now know that I'm not the only one experiencing the problem.

Is there much difference between ImageMagick - Imagick with Windows and Linux?

Re: Version problem Imagick & ImageMagick

Posted: 2014-02-12T01:49:01-07:00
by jeffreyg
I fixed the problem thanks to this site:

http://www.peewit.fr/imagick/

Shows you the builds of ImageMagick with a working Imagick.dll. Works like a charm now.

Re: Version problem Imagick & ImageMagick

Posted: 2014-02-12T03:55:36-07:00
by Bonzo
That is the site I downloaded my dll from but as I say it did not work.

Thanks for reporting back and I may have another go.

Re: Version problem Imagick & ImageMagick

Posted: 2014-02-12T05:27:51-07:00
by jeffreyg
No problem. I will make a quick summery of what I did:

The only thing is that I had to downgrade my ImageMagick a bit. I used 6.8.8-1 and now I'm using 6.8.1-8. At least it works for me now with the following specs:

Windows: 32-bit
Compiler: MSVC9
PHP version: 5.4
ImageMagick version: 6.8.1-8 Q16

Then 1 of these 2 .dll files:

Thread safe

http://www.peewit.fr/imagick/vc9/x86/ts/php_imagick.dll

Non-Thread safe

http://www.peewit.fr/imagick/vc9/x86/nt ... magick.dll


And because I don't want those path issues, I installed it in the Xampp folder itself. So now in my phpinfo(); I see Imagick enabled and I can use it and I can still use exec();

So downgrading ImageMagick to the version that suits the .dll file of the PHP version did it for me.