Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ImageMagick PHP 5.5 on IIS 7.5

Posted on 2014-07-31
17
Medium Priority
?
2,473 Views
Last Modified: 2014-08-04
I'm trying to get this setup working. Here is what I've done.

Installed ImageMagick-6.8.9-6-Q16-x86-dll.exe from imagemagick.org.

Copied the DLL From php_imagick-3.1.2-5.5-nts-vc11-x86.zip to the php ext directory.  Downloaded from here http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/

Added this line(s) to the php.ini
[PHP_IMAGICK]
extension=php_imagick.dll


Did an IIS reset. Try to access it via a test script, and I get Class 'Imagick' not found, and it isn't showing up in phpinfo.

From other web searchs it looks like most struggle with getting the php, program, and dll versions matched up but I think I've done that. PHP is 5.5 VC11 x86. I installed the latest x86 version of the program, and installed the 5.5 NTS x86 VC11 version of the DLL. I'm at a loss.
0
Comment
Question by:bhieb
  • 9
  • 5
  • 3
17 Comments
 

Author Comment

by:bhieb
ID: 40232253
Some more info. Ok so i went back to the drawing board, visited a site that others mentioned. http://www.peewit.fr/imagick/ Since that site valiates to IM 6.8.4 i loaded ImageMagick-6.8.4-0-Q8-x86-dll.exe  .

Now the ImageMagick section shows up on phpinfo, but when I run this. It returns not installed class doesn't exist. So I'm closer, but still no joy.

if (!extension_loaded('imagick'))
    echo 'imagick not installed';
	
if( class_exists("Imagick") )
	{
	echo 'class exists';
	}
	else
	{
	echo 'class does not exist';
	}

Open in new window

0
 
LVL 15

Expert Comment

by:Insoftservice
ID: 40232450
INSTALL STEPS TAKEN

To install IMagick on Windows XP (PHP 5.2.x)

    download and install ImageMagick-6.5.8-7 Q16-windows-dll.exe http://www.imagemagick.org/download/binaries/ImageMagick-6.5.8-7-Q16-windows-dll.exe

    download php_imagick_dyn-Q16.dll from http://valokuva.org/outside-blog-content/imagick-windows-builds/080709/

    copy DLL to [PHP]/extension dir and rename it to php_imagick.dll

    You have to edit your php.ini file and add the new extension:

    extension=php_imagick.dll

    Save php.ini and restart Apache server. (If necessary, restart Windows)

    phpinfo() should show imagick enabled.
0
 

Author Comment

by:bhieb
ID: 40232641
Thanks for the try, but that is pretty dated info since it is XP and php 5.2.  WIth broken download links to valokuva.  Not to mention I've already stated that all of that has been done, and it IS showing in phpinfo().
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 15

Expert Comment

by:Insoftservice
ID: 40232656
good to hear that.
I hope you tried nearly same steps right? Except php version
0
 

Author Comment

by:bhieb
ID: 40232660
Yes the exact same steps but with updated versions from http://www.peewit.fr/imagick/  to match my php, vc installation.
0
 
LVL 15

Expert Comment

by:Insoftservice
ID: 40232699
Ok so my comment was help full for you to resolve your issue beside version issue.
Best of luck for your project
0
 
LVL 58

Expert Comment

by:Gary
ID: 40232789
Ok so my comment was help full for you to resolve your issue beside version issue.
Ignorance is bliss

Did you select Add to System Path when installing?
Did you completely restart IIS
What do the IIS logs say
0
 
LVL 58

Expert Comment

by:Gary
ID: 40232838
You said in the opening question it wasn't showing in phpinfo and then later you said it is???
0
 

Author Comment

by:bhieb
ID: 40232843
Yes I did do that add of the path. I even added the system variable per this link.
http://refreshless.com/blog/imagick-pecl-imagemagick-windows 

I did an iisreset, and actually have since rebooted the server since it could have been the enviro variable. I found my IIS logs and I don't see anything in them, and the php logs are clear too.
0
 

Author Comment

by:bhieb
ID: 40232844
Yes now it is, my 2nd post I tried an older version and got past that.
0
 

Author Comment

by:bhieb
ID: 40232860
Since we did get side tracked a little here is my current state.

Got the DLL from here. http://windows.php.net/downloads/pecl/deps/
ImageMagick-6.8.9-1-vc11-x86.zip

Install package from here. http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/
ImageMagick-6.8.9-1-Q16-x86-dll.exe  

dll is in the \ext directory with the extension=php_imagick.dll added to the php.ini.

phpinfo() shows the section. But the test code returns not installed.

The path is set, and the new environ variable is there too.
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40233023
ImageMagick has to be the hardest thing to install

Remove what you have

Can you get the dll from here
http://www.peewit.fr/imagick/

From the sunset link grab the 6.8.4 version
0
 

Author Comment

by:bhieb
ID: 40233047
Same imagick not installed error. I even made sure to double check the path and environ variable.  Shows fine in phpinfo() though so that is weird.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40233063
It may be a false negative, try actually using the plugin on an image.
Something like

$image = new Imagick('someimage.jpg');
0
 

Author Comment

by:bhieb
ID: 40239167
Still no luck. We've decided to go a different route.  At this point even if I get it working, I'd be hesitant to put such a flaky product into production. I'll toss you the points since you were the most helpful Gary.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40239191
The GD library can do a lot of things and it's part of PHP
0
 

Author Comment

by:bhieb
ID: 40239209
Yep that is what we use primarily, we wanted the ability to create a thumbnail from a PDF or convert from PDF > JPG> thumbnail for publishing PDF brochures. It is such a niche in our environment, that we can do it manually.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question