Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

 

I thought that I would post this as it may be of help to anyone using the Imagick DLL in PHP to access Image Magick functions. In case you are not aware, Image Magick is very function-rich and terrific open source software for image manipulations. My use of it is extremely basic, just to resize jpg images.

 

About a year ago I came across the php imagemagick dll (filename is php_imagick.dll and installed it without any problems. At the time I already had Image Magick installed on my PC. To my delight, I managed to get my resizing to work just fine (previously I had been using the PHP GD library functions).

 

A week or so ago I installed the latest version of Image Magick on my PC. To my horror the PHP functionality stopped working. After some Googling I discovered that your php imagick dll has to align version-wise with your installed Image Magick. So I tried to find the latest php dll but although I found a reasonably current dll it was incompatible with my newly installed Image Magick package. I could not find out how to ascertain the version alignment of the php dll though it is clear what the version number of the Image Magick PC package is. My installation last year was just luck!!

 

I eventually found a more current php imagick dll 'buried' inside the PECL Imagick zip file (available from the web) but it too was not version-aligned with my new Image Magick installation.

 

Luckily I still had the 'old' Image Magick install exe so I uninstalled the new Image Magick and then re-installed the old version and now everything works OK again.

 

One is tempted to comment 'traps for young players' but as I don't qualify for the 'young' tag, I will say that it is 'traps for inexperienced players':-)

 

Cheers from Oz.

Link to comment
Share on other sites

Yes, that sort of thing can be frustrating, and anyone that has tried to set up their own server has undoubtedly experienced similar woes on many occasions (I know I have).

 

When it comes down to it, it can be really frustrating as well when you realize the whole problem is some minor incompatibility or cruddy documentation that doesn't clearly explain what to do, and as a result, you forget to execute one command.

 

I guess what I'm saying is that most of us aren't idiots, but it can be really confusing and frustrating.

Well, here's to feeling your pain (and the eventual elation when you finally get it working).

Link to comment
Share on other sites

Guest Deleted

I feel your pain as well!!! Like you, I like ImageMagick/Imagick but I hate how incomplete the documentation is. I used the Imagick class to generate highly customizable artwork of animals and finding out how to do that was not easy. It took a lot of trial and error and a lot of Googling. As I recall, the most helpful resource was the notes people left on Imagick's PHP manual pages.

 

And sadly, I never found an answer to all my problems. You see, my remote host runs Linux and Imagick runs just dandy on that but I cannot for the life of me get it to run in my test environment, which is Windows 7. I Googled my heart out and I asked people questions but nobody could get it to work. I just gave up and decided that perhaps I need to set up a Linux virtual machine and use that as my test environment.

Link to comment
Share on other sites

Hi, I found the easiest way to install Image Magick on my Windows 7 PC was to use the installation exe file. It comes in several flavours and I chose the Q16 dll 32 bit dynamic version from http://www.imagemagick.org/script/binary-releases.php#windows

It has the latest version but to make it compatible with the PHP dll I had I had to go back to version 6.8.6 which fortunately I had the installation exe for.

At one stage I tried to build it from source but I was not able to and it seemed too hard for me anyway.

The installation exe was very quick and you have a couple of install option to set - I chose to install the header files but not to associate image files with it.

 

Hope it helps.

 

Cheers from Oz.

Link to comment
Share on other sites

Guest Deleted

Oh also I use XAMPP. As I recall, that had something to do with it not working. Maybe it was the PHP version that came with that particular version of XAMPP. I don't know. (Wish I could remember.)

 

I'll try your suggestion tomorrow when I'm more awake :)

Link to comment
Share on other sites

I use XAMPP too. I don't think that the version of PHP is an issue (FYI I use version 5.5.3 which came with the XAMPP that I installed about a year ago). What is an issue if you want to use the PHP Imagick dll is the version synchronisation between the dll and Image Magick installed on your PC.

 

I.e., for the PHP dll to work you also have to have the version-aligned ImageMagick installed.

 

So my suggestion is to try the windows installation exe as per above which will install ImageMagick on your PC. Then to use ImageMagick functionality in PHP you must separately install the version-aligned php_imagick.dll and 'tell' PHP about it.

 

I specifically had to go back to the installation exe "ImageMagick-6.8.6-9-Q16-x86-dll.exe" (you may be able to find that specific version with a Google search). That version aligned with the php_imagick.dll file that I had for PHP. I think that that dll is still available by extracting it from the Imagick PECL install from the 'Net.

 

I'll be interested to hear how you get on.

 

It's now night time here in Oz so I'll sign off for tonight and check the forum tomorrow.

 

Cheers from Oz.

Link to comment
Share on other sites

Hmmm - FYI prior (Windows) releases of the full Image Magick can be found at http://www.imagemagick.org/download/windows/releases/ but I don't see the windows installation exe - just the 'raw' source from which to build an installation.  As mentioned, I tried that but gave it away as 'too hard'!

 

I am wondering how you are getting on?

 

Cheers.

Link to comment
Share on other sites

  • 3 years later...

My goodness, the last post on this subject was over 3 years ago.

 

I just installed Imagick/Image Magick on a 'clean' PC under XAMPP/PHP7/Windows 10.

 

The only guide that has worked reliably for me is from this post: https://herbmiller.me/installing-imagick-php-7/#more-19745 I have thanked this gentleman profusely as the post sets out step by step exactly what needs to be done.

 

I fell into one trap in that I set the environment variables at a user level but they have to be set at a system level.  Once I fixed that phpinfo indicated a correct installation.

 

Posted in case it is of interest to others.

 

Cheers

Link to comment
Share on other sites

 Share

×
×
  • Create New...