Installing ImageMagick on Windows Installing ImageMagick on Windows
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Installing ImageMagick on Windows

Started by mlrtime99, May 30, 2005, 04:45:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mlrtime99

Holy Crap!! I'm making this thread for all of my breatheren out there trying to run IM for their CPG on a Windows machine.  Short story, I used GD for awhile and it worked great, but I soon wanted to upload gif's (which I could after the fix) and later bmp's which is impossible unless you're using ImageMagick.  Few coppermine users are on IM and even fewer run their own server (let alone a windows server)  For the few and the proud out there though, follow these rules and you should have it all install in about 30 minutes.

1) Download the executables from http://www.imagemagick.org/script/binary-releases.php#windows if this link is dead the exact filename was ImageMagick-6.2.3-0-Q16-windows-dll.exe

2) Run and install... BE SURE to install into a directory that your internet users will have access to.  For most of you this is your \Inetpub\wwwroot directory.  For me specifically E:\Inetpub\wwwroot\imagemagick (we'll use this for examples later)

3) Test your install, not the stupid display test mentioned in the install... test your privledges by browsing your site and check the convert utility.  For my example open http://testsite.com/imagemagick/convert.exe, a program should try running... congrats, your users have access.

4) This was the only step I found "odd" and most problematic.  Copy your cmd.exe (typically in your C:\WINDOWS\system32 directory) and paste it into your php install directory (for me c:\php)

5) Tada... the weirdness is over, get to your coppermine config page and select ImageMagick as your method of resizing and enter the directory of your IM install.  For my example it was E:/Inetpub/wwwroot/imagemagick/ !!!NOTE the forward slashes and the ending forward slash.

That's about it kids, let me know if you have any questions

Server specs

IIS 6.0
PHP Version 4.3.11
CPG 1.3.3
GD Version WAS 2.0.28
website > http://benmiller.servebeer.com

???Sticky Material?

Joachim Müller

Thanks for contributing, but there are some remarks I have to make:
Quote from: mlrtime99 on May 30, 2005, 04:45:40 AM
2) Run and install... BE SURE to install into a directory that your internet users will have access to.  For most of you this is your \Inetpub\wwwroot directory.  For me specifically E:\Inetpub\wwwroot\imagemagick (we'll use this for examples later)
Not recommended at all. Executables should never by accessible for internet users. I recommend installing ImageMagick into a folder of it's own outside of the webroot, like c:\ImageMagick\. Make sure that the path to ImageMagick's executables doesn't contain spaces. c:\Program Files\ImageMagick\ or c:\Image Magick\ are not an option!

Quote from: mlrtime99 on May 30, 2005, 04:45:40 AM3) Test your install, not the stupid display test mentioned in the install... test your privledges by browsing your site and check the convert utility.  For my example open http://testsite.com/imagemagick/convert.exe, a program should try running... congrats, your users have access.
As suggested above: you shouldn't put the executables into the webroot, under no circumstances. Of course if you don't you won't be able to run this test as mlrtime99 suggested, but this doesn't matter.

Quote from: mlrtime99 on May 30, 2005, 04:45:40 AM4) This was the only step I found "odd" and most problematic.  Copy your cmd.exe (typically in your C:\WINDOWS\system32 directory) and paste it into your php install directory (for me c:\php)
huh? ???




mlrtime99, I really appreciate your readiness to share your knowledge with others, but let me warn all: this method is not recommended at all. Like I said above: put ImageMagick into a folder outside of your webroot, it mustn't be accessible over the web. The only "Tricky" thing you have to do is set the permissions on the ImageMagick folder for the user that the webserver runs under. For IIS on WIndows, this is the IUSR account, for apache on Windows, this usually is the "apache" account. Setting permissions to "Full control" for everybody on a folder outside the webroot is less risky than settings restrictive permissions within the webroot. The only thing you gain with mlrtime99's suggestion is that you won't have to mess with permissions, as the permissions are inherited by the webroot (which is even worse). This is the tricky bit about running a webserver of your own, especially if you're on Windows: by default, it's veeeeeeryyyy insecure. Doing what mlrtime99 suggested makes it even more insecure. Don't!