Solved

ImageMagick PHP 5.5 on IIS 7.5

Posted on 2014-07-31
17
2,146 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now