logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP 5.2.5 and ImageMagick
Author
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Thu 10 Jan '08 9:52    Post subject: PHP 5.2.5 and ImageMagick Reply with quote

I just did a fresh install of Apache 2.2.6 (Steffin's patched release), PHP 5.2.5, MySQL 5.0.45, ActivePearl 5.8.8, hMailServer 4.4.1, SquirellMail 1.4.13, awstats 6.7, phpMyAdmin 2.11.3 and ImageMagick 6.3.7.9 Q16 on Windows 2000 Server.

Everything seem to go smooth until I got to ImageMagick. It seems the pecl binaries didn't have the php_imagick.dll and of course grabing a compiled version through pecl doesn't seem to work on Windows so I was sorta stuck. I even tried using an older version from earlier pecl release, but of course that didn't work.

I ended up grabbing a snapshot of the pecl (http://snaps.php.net/) where the beta release of php_imagick.dll 2.1.0RC2 was found. This seemed to fix the issue. I mention this because I noticed a whole slew of hits on Google about this same issue and no one seem to have a proper solution for them.

So if you are getting:
"DrawSetFontSize not find in the dynamic link library CORE_RL_magick_.dll"

or

"Unknown():unable to load dynamic library "\path\to\php\ext\php_magick.dll"

or other issues with ImageMagick, be sure to try the snapshots of the pecl binaries from snaps.php.net before pulling all your hair out. Smile
Back to top
PipoDeClown



Joined: 20 Dec 2005
Posts: 77

PostPosted: Sun 20 Jan '08 1:39    Post subject: Reply with quote

maybe this helps:
Imagick Windows Builds
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sat 08 Mar '08 23:02    Post subject: Reply with quote

What I found was that the php_imagick.dll at http://pecl4win.php.net/ext.php/php_imagick.dll was compiled against ImageMagick 6.3.3 so if you use that file you will need to install ImageMagick 6.3.3.

The extensions on Mikko's site is compiled against ImageMagick 6.3.7 so you need to install ImageMagick 6.3.7 to make his work.

I posted this on the ImageMagick forum as well but I thought I'd clearify it here as well. It sure would be nice if everyone was on the same version. Smile

I do like Mikko's extension although it seems I'm having issues with some of the commands not working properly I suspect he's still ironing out a few things or I just haven't grasped quite all of it yet.
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sun 16 Mar '08 13:57    Post subject: Reply with quote

Ok, so now I have VCE 2005 up and running I gave a shot at compiling imagick 2.1.1 stable release from the PECL site which turned out to be tougher than it looked.

The install file says to simply add the imagick folder from the source to the ext folder of the php source and build --with-imagick to create the php_imagick.dll. Well kinda, but not quite.

First you have to install ImageMagick, then copy the contents of its include and lib folders to the right place in the php_build folders. Here's how I accomplished it:

1. Download Microsoft Visual Studio 2005 Express, install, update and register.

2. Download Microsoft Platform SDK for Windows 2003 R2, install and setup via this link http://msdn2.microsoft.com/en-us/library/ms235626(VS.80).aspx

3. Download PHP Source and extract into a temp folder using 7Zip or similar utility that supports tar, bz2, etc.

4. Download bindlib_w32 and extract into a temp folder and build resolv.lib.

5. Download ImageMagick, install and test to make sure it works.

6. Download zip.zip and extract into a temp folder.

7. Download imagick 2.1.1 and extract into a temp folder.

8. Create a work folder to begin the project, i.e. x:\work and place the php-5.2.5, php_build, template and bindlib_w32 folders into it.

9. Add the x:\work\php_build\bin to PATH, x:\work\php_build\include to INCLUDE and x:\work\php_build\lib to LIB Environment Variables under Start -> Control Panel -> System -> Advanced -> Environment Variables -> System Variables

10. Rename the following:
x:\work\php_build\include\magick -> x:\work\php_build\include\magick.old,
x:\work\php_build\include\Magick++ -> x:\work\php_build\include\Magick++.old,
x:\work\php_build\include\imagemagick\magick -> x:\work\php_build\include\imagemagick\magick.old,
x:\work\php_build\include\imagemagick\wand -> x:\work\php_build\include\imagemagick\wand.old,
x:\work\php_build\lib\CORE_RL_magick_.lib -> x:\work\php_build\lib\CORE_RL_magick_.lib.old,
x:\work\php_build\lib\CORE_RL_Magick++_.lib -> x:\work\php_build\lib\CORE_RL_Magick++_.lib.old,
x:\work\php_build\lib\X11.lib -> x:\work\php_build\lib\X11.lib.old,
x:\work\php_build\lib\resolv.lib -> x:\work\php_build\lib\resolv.lib.old

11. Copy the following from your ImageMagick installation folder, i.e. C:\Program Files\ImageMagick to the x\work\php_build folder(s) below:
C:\Program Files\ImageMagick\include\wand\*.* -> x\work\php_build\include\imagemagick\wand,
C:\Program Files\ImageMagick\include\magick\*.* -> x\work\php_build\include\imagemagick\magick,
C:\Program Files\ImageMagick\include\Magick++\*.* -> x\work\php_build\include\imagemagick\Magick++,
C:\Program Files\ImageMagick\lib\*.* -> x\work\php_build\lib,

12. Copy resolv.lib from x\work\bindlib_w32\Release\resolv.lib -> x\work\php_build\lib\resolv.lib

13. Copy the imagick-2.1.1 folder from your temp folder to x:\work\php-5.2.5\ext and rename it to x:\work\php-5.2.5\ext\imagick

14. Open Start -> All Programs -> Visual C++ 2005 Express Edition -> Visual Studio Tools -> Visual Studio 2005 Command Prompt

15. Change to your PHP Source folder, i.e. x:\work\php-5.2.5

16. Enter the following commands:
Code:
buildconf
cscript /nologo configure.js --enable-snapshot-build
nmake snap

This should create a working copy of PHP with the needed php_imagick.dll under the x:\work\php-5.2.5\Release_TS\php-5.2.5\ext folder. I hope this saves a few people the day or two it took me to figure out. Smile
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 692

PostPosted: Sun 16 Mar '08 14:27    Post subject: Reply with quote

Mitron,

Maybe you can post it also in the forum How-to's & Documentation & Tips

Thanks,

Steffen
Back to top


Reply to topic   Topic: PHP 5.2.5 and ImageMagick View previous topic :: View next topic
Post new topic   Forum Index -> Other Software