Page 1 of 1

Imagemagick in XAMPP

PostPosted: 07. June 2008 22:42
by jjhiggi
I was under the impression that XAMPP (and PHP) came with the Imagemagick extension pre-installed. Is this correct? I am unable to locate the php_imagick.dll in php/ext or php/extensions.

Do I need to install Imagemagick and the extension for XAMPP?

PostPosted: 08. June 2008 19:59
by w4vy
Hello jjhiggi, I came across thes same problem when uncomenting the extention in the php.ini and then running xampp only to get the same error so I downloaded imagemagick and installed the .dll version hoping that might solve the problem but I still can't get it to work right. I even tried the .static version to but that didn't work either. So I still don't have it working so I to am hoping this question gets resloved in here but if you do manage to work it out will you post here and let us all know thank you.

w4vy

Resolved... sort of

PostPosted: 09. June 2008 17:32
by jjhiggi
Okay, I resolved this... kind of. Basically, inside of my PHP application where I call the library, I was pointing to the actual dll inside of /php/ext/ ... this is what several people were telling me to do from other forums. I was finally able to get my code to work by simply instally ImageMagic to my xampp folder and then pointing to that folder.

I am using codeigniter which has an imagemanipulation class and, when you call that class, you have to point to the location of the image library you are using.

After uncommenting the extension inside of the php.ini file, I downloaded the ImageMagick Q16 dll from here... http://valokuva.org/?page_id=50

I dropped it into the folder xampp/php/ext

Then, I installed ImageMagick to xampp using the binary Q16 dll installation from here... http://www.imagemagick.org/script/binar ... hp#windows

I restarted xampp.

Then, inside of my CodeIgniter application code I set the library_path like so...

// Config to resize
$config['image_library'] = 'imagemagick';

// XAMPP
$config['library_path'] = '/xampp/ImageMagick-6.4.1-Q16';

Obviously, if you're not using CodeIgniter, it's going to be a little different for you, but I wanted to share what I did. You can see my read my forum post at the CodeIgniter forum here...

http://codeigniter.com/forums/viewthread/81675/

One final note... when I restart xampp, I still get a couple of error alerts, telling me ImageMagick can't locate some entry points. I googled the errors and it seems to be a known issue... that is supposedly fixed by later dll files, but I did not find that to be the case. That said, my app is still working... for now :)

PostPosted: 11. June 2008 02:07
by w4vy
Thanks Jim i'll have another go at this now and see if I can get it working for me some time soon. Kudos to you ;)

w4vy

PostPosted: 08. August 2008 01:13
by junkpop
I can't get ImageMagick working for the life of me...

The way my PHP script checks for ImageMagick is through this command:
Code: Select all
extension_loaded('imagick')


Unfortunately, it keeps returning false, and I don't see a way to point to a specific path like jjhiggi did.

I don't understand why the ImageMagic extension doesn't work when I've un-commented
Code: Select all
extension=php_imagick.dll
in both php.ini and php5.ini, and php_imagick.dll is present in both /ext and /extensions.

Any help? Thanks!

PostPosted: 10. August 2008 08:11
by junkpop
Anyone? :)

PostPosted: 10. August 2008 13:51
by Wiedmann
and I don't see a way to point to a specific path like jjhiggi did.

"jjhiggi" is using the binary with an exec(). You want use the ImageMagick Module.

extension_loaded('imagick')

The module "php_imagick.dll" need access to some ImageMagick DLLs.
--> you must install ImageMagick in the correct version (don't know the version, but not the latest), and install directory must be in your PATH (environment variable).

PostPosted: 11. August 2008 00:25
by junkpop
Thanks Wiedmann. This is how I made it work:

installed windows dynamic binary ( ImageMagick-6.4.2-7-Q16-windows-dll.exe from imagemagick.org ) to
Code: Select all
xampp/imagemagick


windows environment variable (System Settings > Environment Variables > System Variable > edit Path):
set to above directory

download php_imagick_dyn-Q16.dll from http://valokuva.org/?page_id=50

place that file in
Code: Select all
/xampp/php/ext


php.ini (in apache/bin):
add
Code: Select all
extension=php_imagick_dyn-Q16.dll

and comment out
Code: Select all
extension=php_imagick.dll
if not already commented

PostPosted: 14. August 2008 18:56
by Gliebster
I just want to say thanks to jjhiggi. I happen to be running CodeIgniter on xampp/win too and your instructions saved me some time. :D

PostPosted: 14. August 2008 20:22
by Gliebster
Wiedmann wrote:
and I don't see a way to point to a specific path like jjhiggi did.

"jjhiggi" is using the binary with an exec(). You want use the ImageMagick Module.


After doing what jjhiggi did, I wanted ImageMagick as a module too. Starting Apache up threw errors about some missing DLLs. Not sure if this is proper or not but it solved my problem quick: I ended up copying all CORE_RL_*.dll files and X11.dll from ImageMagick's folder into /xampp/apache/bin. I restarted Apache without getting errors, and now I am able to use the PHP ImageMagick functions.

Re: Imagemagick in XAMPP

PostPosted: 11. June 2009 07:33
by sayirb
Hi team,
I followed the above steps to set up the ImageMagick . But it is still out of working. I am using Zent framework. Can anyone explain stepwise procedure to setup ImageMagick in XAMPP for WIN-XP ?