Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ImageMagick in PHP, Windows/Apache

Posted on 2010-08-27
6
Medium Priority
?
2,051 Views
Last Modified: 2013-12-13
My situation:

Windows Vista
Apache 2
PHP 5.3
ImageMagick 6.6.3 Q16

ImageMagick works through the command line, and from php via passthru or exec.

problem:  cannot get Imagick (the PHP extension class for communicating with ImageMagick) working.

phpinfo does not show the Imagick module.

When attempting to instance through PHP:
  Fatal error: Class 'Imagick' not found

I’ve tried multiple DLLs, most recently one from http://valokuva.org/?page_id=50.

This line is in php.ini:
  extension=php_imagick.dll

php.ini extension dir is:
  extension_dir=C:\PHP\ext

php_imagick.dll exists in C:\PHP\ext

added environment variable to apache, which shows up via phpinfo as:
  _SERVER["MAGICK_HOME"]      C:/ImageMagick

C:/ImageMagick is the correct installation directory

phpinfo show configuration file as:
  C:\PHP\php.ini

this is the correct configuration file, and the file that reflects the edits mentioned above.

i'd be grateful for any advice
0
Comment
Question by:moagrius
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 2000 total points
ID: 33548753
Go to the command prompt.

Type ...

php -d display_startup_errors=1 --re imagick

0
 
LVL 19

Author Comment

by:moagrius
ID: 33549135
awesome - thanks.

apparently i need the VC6 dll:

PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP    compiled with build ID=API20090626,TS,VC6
These options need to match

i remembered finding it yesterday at http://www.sk89q.com/downloads/imagick/2.3.0/API20090626-TS-VC6/php_imagick.dll, but the site's down :/

it was up yesterday, so worst case i'll just keep trying throughout the day.

before i close this post, any chance you know where i might find a copy elsewhere?  every result on google just pointed to the above dead link...

thanks a ton
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33549438
The safest bet is to build it yourself. Not an overly complicated process, but you do need to build the right version. Which could be hard as getting hold of a VC6 compiler is not easy (legally).

You can drop the PHP Windows mailing list a request (See http://docs.php.net/mailing-lists.php).

Normally a very helpful chap called Pierre will point you in the right direction.

Unfortunately, the PECL4Win site has been down for several years. This site had all the version.

Maybe one day.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 19

Author Comment

by:moagrius
ID: 33549573
the site's back up - dl'ed the VC6 dll - restarted apache - imagick now listed in the modules, so moving forward

just saw that i'm getting another error when instancing, but at least it's loaded

thanks for the tip
0
 
LVL 19

Author Closing Comment

by:moagrius
ID: 33549579
thanks
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33549592
It's a complicated old world now with 2 C versions (VC6/VC9), 2 chipsets (x86/x64), 2 threading models (ts/nts), different SAPIs (ISAPI, FastCGI, Apache, Apache2.2, cli), etc.

And then the PHP versions.

And then matching them all up so the extensions agree with the main core...

It's remarkable anything ever works.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

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.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

704 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