Hello,
The new build page http://valokuva.org/magick
The installation steps should be somewhat like the following:
1. Install ImageMagick from http://imagemagick.org/script/binary-releases.php#windows. Choose Win32 dynamic at 16 bits-per-pixel. During the installation choose “Add to system path” or add the dir manually to your PATH.
2. Download php_imagick.dll from PHP 5.3 Windows builds and put it into your extension_dir. ts means thread-safe and nts is non-thread-safe. The latter is usually used with FastCGI.
3. Voila! You should now see imagick in phpinfo. If not, let me know.
#1 by MrABC on July 8, 2009 - 11:17 am
Quote
Is there static Build for php 5.3?
#2 by Marc Brugue on July 8, 2009 - 12:01 pm
Quote
Hi there!
In php, i’m trying to reformat a pdf into a tiff with compression G4, the result image is compressed BUT IN NEGATIVE COLORS… I dont know why…
There’s any option/function to prevent this?
And why this happen?
Here’s my code
$this->_IMAGE = new Imagick();
$this->_IMAGE->setResolution($this->_Resolution, $this->_Resolution);
$this->_IMAGE->readImage(….);
…
$this->_IMAGE->setImageFormat(‘tiff’);
$this->_IMAGE->setCompression(imagick::COMPRESSION_GROUP4)
…
echo $this->_IMAGE
If I try with setImageCompression(imagick::COMPRESSION_GROUP4), the result has no compression…
Thanks a lot
#3 by Joe James on July 8, 2009 - 11:23 pm
Quote
Has anyone got this working with PHP 5 VC9 NTS with fastcgi? Having issues with
$im = new imagick($file);
giving errors
PHP Fatal error: Uncaught exception ‘ImagickException’ with message ‘Wand contains no images `MagickWand-1′ @ magick-image.c/MagickSetImageFilename/9424′
#4 by akhan on July 10, 2009 - 8:41 pm
Quote
Mikko, thank you so much for the new 5.3 builds =)
#5 by Tuoni on July 15, 2009 - 4:52 pm
Quote
Mikko, thank you for this – I’d read all over the ‘net that there were no windows build of the Imagick extension, so I haven’t been able to test locally _until now_! I can’t believe this website isn’t linked from anywhere, I came across it completely by accident!
Also, as a note to anybody installing this on a Windows build of PHP 5.3 with Apache 2.2, I am using the VC9 build without any issues (but as I say, this is only a local dev machine so it doesn’t get hammered…)
Keep up the good work
#6 by Joe James on July 15, 2009 - 11:42 pm
Quote
phpinfo shows imagick like it should but I can not get it to load existing images to manipulate only been able to create brand new images.
Been successfull using the old dll with php 5.2.10 with thread safe.
IIS 6.0
php 5.3 non thread safe
imagick.dll for nts
gives me errors loading images that exist when i call
$im->new imagick($some_file_including_dir);
path and files have to proper permissions, because php 5.2.10 work with the older dynamic 8 bit dll
#7 by Jon Capps on July 21, 2009 - 7:47 am
Quote
Well, I’ve been trying to get this to work on my pc with no luck. I’m on Win Vista Home Premium, using php 5.3.0, Apache 2.2.9, ImageMagick 6.5.4-3-Q16-windows-dll, and the new php5.3 windows build of php_imagick.dll. Running convert from the command line works, but I keep getting the error: “Unable to load dynamic library ‘C:\\Program Files\\PHP\\ext\\php_imagick.dll’ – The specified module could not be found.” on Apache restart. ImageMagick is installed in C:\imagemagick and MAGICK_HOME is set in httpd.conf. I really appreciate all the work you’ve done on this, but I can’t get it running on my machine. I give up. At least for tonight.
#8 by Pepino on July 21, 2009 - 11:19 am
Quote
Hi,
pls where i get imagemagick_config-6.3.7-2.tgz ? I search this one on google but i can’t found it..
#9 by Arj on July 21, 2009 - 9:20 pm
Quote
Hi
Me too got the error: “Unable to load dynamic library ‘C:\wamp\php5.3.0\ext\php_imagick.dll’ – The specified module could not be found.â€
whats the solution to solve this
#10 by Mikko Koppanen on July 21, 2009 - 9:43 pm
Quote
Arj,
Have you installed ImageMagick?
#11 by Mikko Koppanen on July 21, 2009 - 9:45 pm
Quote
@Pepino,
http://valokuva.org/outside-blog-content/imagemagick-config/imagemagick_config-6.3.7-2.tgz
#12 by Mikko Koppanen on July 21, 2009 - 9:46 pm
Quote
Jon Capps,
are all components compiled with VC9?
#13 by Arj on July 21, 2009 - 10:04 pm
Quote
I got that error… it say VC6…
how can i upgrade to VC9
#14 by Arj on July 21, 2009 - 10:13 pm
Quote
Im using windows XP, Php5.3.0, Apache2.2.11
#15 by Mikko Koppanen on July 21, 2009 - 10:18 pm
Quote
@Arj,
Imagick+ImageMagick are current VC9. You need PHP 5.3.0 and Apache compiled with VC9 as well. The problem is that I can not provide builds for VC6 because I don’t have the compiler.
You can probably find VC9 PHP 5.3.0 snapshot build from http://windows.php.net/snapshots/.
I think they got VC9 (MSVS 2008) apache build here: http://www.apachelounge.com/download/
#16 by Arj on July 21, 2009 - 10:23 pm
Quote
Hi Mikko
Thanks for your reply.
I confused on how to configure this..
Im using WAMP2.0
#17 by Arj on July 21, 2009 - 10:31 pm
Quote
I have downloaded
php-5.3-nts-win32-VC9-x86-latest.msi
#18 by Arj on July 21, 2009 - 10:36 pm
Quote
I have MySQL 5.1.36 with this wamp2 is i need VC9 for this too?
#19 by Arj on July 21, 2009 - 10:56 pm
Quote
I have installed php-5.3-nts-win32-VC9-x86-latest.msi and I upgrade the Apache too by copying the files from httpd-2.2.11a-win32-x86-ssl.zip file.
But now the wamp yeilds
Unable to load dynamic library ‘C:\wamp\php5.3.0\ext\php_mbstring.dll’
Unable to load dynamic library ‘C:\wamp\php5.3.0\ext\php_exif.dll’
Unable to load dynamic library ‘C:\wamp\php5.3.0\ext\php_gd2.dll’
#20 by Mikko Koppanen on July 21, 2009 - 11:12 pm
Quote
Arj,
MySQL does not need to be VC9, just the stuff that runs inside the same process. Are the extensions mentioned in the error the ones that were installed with the snapshot?
#21 by Arj on July 21, 2009 - 11:19 pm
Quote
yes Mikko in that location only what i need to do
#22 by Mikko Koppanen on July 21, 2009 - 11:52 pm
Quote
Arj,
did you install the snapshot to C:\wamp\php5.3.0? Looking at the error either those dlls don’t exist or they are for wrong version.
#23 by Arj on July 22, 2009 - 6:44 am
Quote
But i have used the .msi file to install that… whats wrong with me… can you please help this
#24 by Tim on July 23, 2009 - 12:24 pm
Quote
This blog was extremely helpful. I want to extend a very warm thank you to every one of you who posted above me here. My php_imagick is, for the most part, working very well now. I have used both the Q8 and Q16 versions with my Apache2.2 + PHP5.2.8 under windows Vista here at home. The only issue I am having is that upon stopping my Apache server, it crashes (twice). I’m not sure what the problem is and there is no evidence in Apache’s log during startup or shutdown to indicate any significant issues related. Anyone else have any experience with resolving this one?
#25 by Arj on July 24, 2009 - 1:46 pm
Quote
Mikko Koppanen
Did you have VC6 php_imagick.dll?
#26 by Mikko Koppanen on July 24, 2009 - 2:00 pm
Quote
Arj,
as I have said multiple times here I do not have VC6 builds because I don’t have the compiler.
#27 by Arj on July 25, 2009 - 4:22 am
Quote
Hi Mikko
Sorry.
#28 by Joe James on August 5, 2009 - 12:27 am
Quote
Mikko,
I am still having issues with this dll on IIS 6 using fastcgi and php 5.3 Non-thread Safe.
The old dll works on the same server using thread safe php 5.2.x with isapi.
I can create an image from scartch with no problems., but when I try to edit an existing image I get errors.
—————————————–
PHP Fatal error: Uncaught exception ‘ImagickException’ with message ‘Wand contains no images `MagickWand-1′ @ magick-image.c/MagickSetImageFilename/9424′ in “_I removed system path_\test.php:19
Stack trace:
#0 _I removed system path_\test.php(19): Imagick->__construct(‘../uploads/imag…’)
#1 {main}
thrown in _I removed system path_\test.php on line 19
——————————————
here is a link to my test script code that throws that error.
http://snipt.org/lXp
I have Microsoft 2008 C++ Runtime (x86) installed on the server.
phpinfo() also reports that imagick is loaded as it should be.
I have tried php 5.3.0 stable and 5.3.1-dev as of August 4th, but I get the same error.
#29 by Darrell on August 6, 2009 - 12:06 pm
Quote
Well, after fighting with this for a couple of hours, I finally got it all working. Thanks for taking the time to do all this work, Mikko, and for sharing.
My glitch was that I was running “Visual C++ 2005 SP1 Redistributable Package (x86)” and just needed to install “Visual C++ 2008 SP1 Redistributable Package (x86)” instead.
Now it appears all is good.
Thanks again,
-D-
#30 by Mats Lindh on August 9, 2009 - 6:20 pm
Quote
After spending a couple of hours today trying to get things to working after upgrading to PHP 5.3.0, the only thing I’ve managed to narrow things down to is that the new version of ImageMagick on the download site (6.5.4-9), doesn’t seem to play nice with the compiled version above. Tried finding the old one, but for once it seems that most mirror sites have updated fairly quickly.
PHP (with the ZTS) says that “the specified procedure could not be found”. I’m currently running Apache 2.2.12 compiled with VC9, together with PHP 5.3.0 also compiled with VC9. Everything else seems to work as it should (except that 5.3.0 apparently broke junction points).
Anyone have an already compiled, updated version before I start the process of building my own?
#31 by Tom on August 10, 2009 - 10:03 pm
Quote
from the PHP manual : “If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP”. So I downloaded the VC6 version of PHP. Would that be the reason why I don’t manage to get teh Imagic dll to work with my PHP / Apache combination ?
#32 by Dorian on August 11, 2009 - 2:02 pm
Quote
Hello,
First, thank you Mikko for this tutorial.
I have the same error message as Ashley :
Startup: Unable to load dynamic library ‘c:/wamp/bin/php/php5.3.0/ext/php_imagick.dll’ – The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.
I tried to install the vc++ thing to fix it but it didn’t work…
wamp is installed on windows XP tablet edition and everything works except the Imagick thing… ImageMagick works in command lines in windows, it’s installed in C:/ImageMagick…
I had the line in the httpd.conf,
I’ve checked the php.ini file, everything looks ok
I don’t know what to do to solve the problem…
#33 by Dorian on August 11, 2009 - 5:17 pm
Quote
I’ve found the solution of my problem. It was actually because of a copy I didn’t made of the ‘.conf’ files.
I’ve downloaded Apache 2.2 vc9 compiled from Apache lounge and PHP 5.3.0 vc9 compiled from php.net (both can also be found at http://playground.maximebf.com/php )
Once those files are placed in ‘wamp/bin/apache’ and ‘wamp/bin/php’, you just have to copy the wampserver.conf file from the existing directories to the new ones, and the ‘phpforapache.ini’ from the old php to the new one. Then you may change the path in the copied ‘phpforapache’ to make it match with its new location.
When it’s done, you can switch the php and apache version in wamp. And you’re ready to begin Mikko’s tutorial.
et voilà !
Greating from France
#34 by Adrian on August 15, 2009 - 7:38 pm
Quote
Hi Mikko:
I’m having a weird problem with Imagick, and I haven’t been able to finds answers anywhere, so I hope you might be able to help me.
I need to use Imagick on my Windows development environment, but after trying a zillion different versions of the php_imagick.dll library, I’m still getting exceptions when I try to use it.
I’m using wamp 2.0i with Apache 2.2.11, php 5.2.6 (this is a must, I can’t use a newer version, because that’s the one my fellow developers are using on their Linux machines) and ImageMagick 6.5.4 Q16.
So, could you please tell me exactly which build should I use, or if perhaps I must use an older version of ImageMagick, and if so, which one?
I hope you can help me out on this one, since I’m stuck because of this, and I must begin development ASAP.
Thanks in advance
#35 by Mikko Koppanen on August 15, 2009 - 7:49 pm
Quote
Adrian,
if those are your version requirements it’s gonna be easier to install Linux virtual machine and develop there.
#36 by corpfashion on August 23, 2009 - 11:07 am
Quote
ИзвеÑÑ‚Ð½Ð°Ñ Ñ„Ð¸Ñ€Ð¼Ð° Ðрабелла предлагает женÑкую униформу по оптимальной цене. Также готовы предложить промо продукцию и профеÑÑиональную разработку корпоративного ÑÑ‚Ð¸Ð»Ñ Ð² кратчайшие Ñроки Ñ Ð³Ð°Ñ€Ð°Ð½Ñ‚Ð¸ÐµÐ¹ выÑокого качеÑтва.
#37 by niksan on August 25, 2009 - 3:50 pm
Quote
hello Mikko,
With new version of Imagick- 6.5.5-x there is some problem with dunamic extensions. Every time then I tried to start the Apache on Windows there as an error:
PHP Startup: Unable to load dynamic library ‘C:\path\to\php\ext\php_imagick.dll’ – This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Do you have any idea?
Thanks
#38 by Einnob on August 26, 2009 - 12:59 am
Quote
First, Mikko thank you for the awesome work on Imagick! Its’ been a great tool. No problems installing locally.
Anyone try to install the most recent versions on a shared server (webhost) via PEAR/PECL??
Imagick version is 2.3.0 (imagick-2.3.0.tgz)
PHP version 5.3
The package downloads, I get the following:
WARNING: php_bin /usr/local/php5/bin/php appears to have a suffix 5/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20050606
and a request to set the ImageMagick installation prefix ( /usr/local/bin/ )
Unfortunately at this point the install fails with “Unable to open package.xml”.
I’m able to install other PEAR packages, but the Imagick PECL package is proving difficult.
I’ve searched numerous places (and days) but have yet to find the appropriate solution.
Anyone have some ideas on where to look? Or better yet a solution??
The host does have ImageMagick installed (version 6.2.8 and 5.5.6 under different directories, I’m using the install directory for version 6.2.8).
They also have PHP4 and 5 — I’m using PHP5 and have the setting so that *.php is rendered with PHP5. I’m assuming the PHP_BIN warning refers to the directory issue since it repeats “php” in the path. But I’d think this would be a problem for other PEAR installs too? Maybe not though.
Any help would be greatly appreciated — I’d hate to think I have to abandon using the class because it won’t install via PEAR!
Thanks in advance!
#39 by Mitch on August 29, 2009 - 5:45 am
Quote
Can ANYONE upload a VC6 Imagick?
#40 by Sascha on August 30, 2009 - 9:02 pm
Quote
The VC6 can be compiled with Visual Studio 6 but I didn’t know how this work. In my Xampp environment I couldn’t use the VC9…
A VC6 build or an instruction how to use the VC9 with xampp would be very nice.
#41 by juliston on August 31, 2009 - 6:41 am
Quote
It is great work.
I have a problem when i install the new version ImageMagick-6.5.5-4-Q16-windows-dll in windows xp its installed successfully. but when i open this application i got error message “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.” . Could you tell me how to resolve this problem.
Thanks in advance.
#42 by juliston on August 31, 2009 - 7:43 am
Quote
http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en ). Installing this fixed the problem for me.
#43 by Brant on September 15, 2009 - 10:10 pm
Quote
I have read through this forum and many others, but I have still failed to find the answer to my question. Does imagick work on php 5.2.9-2? I can’t seem to get it working no matter what I use. I have installed ImageMagick-6.5.6-1-Q16-windows-dll.exe on one of my drives without any spaces in the folder name. I set the SetEnv MAGICK_HOME “G:/ImageMagic_dyn” to set the environment var.
I then have copied over almost all of the php_imagick.dll files from your server trying them all out to see if they would work. No bueno.
I am using Apache 2.2.11 and php version 5.2.9.2
I keep getting the error:
PHP Warning: PHP Startup: Unable to load dynamic library ‘g:/wamp/bin/php/php5.2.9-2/ext/php_imagick.dll’ – The specified module could not be found.
#44 by Brant on September 15, 2009 - 11:30 pm
Quote
Update:
I have tried it with php 5.3 and it is still no go.
Just some more info. I have installed the VC++2008 runtimes, I have put the environment vars MAGICK_HOME and MAGICK_HOME_CONFIG in the environment vars, and I have reset the computer. Nothing seems to work. The only thing that made a difference is when I installed image magick in a folder with spaces in the name. Then it just crashed apache and wouldn’t let it start.
#45 by Mikko Koppanen on September 15, 2009 - 11:42 pm
Quote
Make sure that all moving parts are compiled with VC9. The official PHP.net builds are VC6.
#46 by Brant on September 16, 2009 - 12:35 am
Quote
Thank you. I think that is the problem. Is there any reason that you do not have compiled versions that are compiled with VC6? It would seem that that would help all the support problems seeing as how the ‘official php builds’ are compiled that way. If you need help, I certainly can learn how to compile them in my VS6 and send them to you for distribution.
BTW The threaded version helped a lot by telling me that the compilers didn’t match. Bravo for that
#47 by Mikko Koppanen on September 16, 2009 - 1:18 am
Quote
Hi,
the main problem being that VC6 compiler has been discontinued quite some time ago. I don’t have a license and currently I don’t even have a Windows environment to compile on. The latest builds were done in an evaluation windows 2008 server with VC9 Express compiler.
#48 by Mikko Koppanen on September 16, 2009 - 1:18 am
Quote
The windows build instructions are here http://wiki.php.net/internals/windows/stepbystepbuild
#49 by Julien TONNEL on September 16, 2009 - 10:24 am
Quote
Hello,
Is it possible to have the latest version of Imagick build for Windows ? I tried with your most recent DLL 2.2.1 but there are some functions not implemented, and I use the PHP 5.2 version for my tests.
I try to compile PECL imagick extension but it’s a little too hard for me, so I’ll be happy if you have built the 2.3.0 version.
Thank you very much,
Julien
#50 by Brant on September 16, 2009 - 6:15 pm
Quote
What are all the php 5.4x imagick builds built on. Are they also compiled using VC9??