Personally I don't think the secure root is any more difficult (now I know how to do it!
). What you need to do is the following;
1) Install the latest version of imageMagick (Make sure it is installed to a directory without spaces as some users have reported problems when using directories with spaces. E.g. 'C:\imagemagick' rather than C:\program files\imagemagick')
2) Get the latest windows binary build of the 'dynamic' imagick dll from here
http://valokuva.org/?page_id=50 If you don't know which to pick choose the one called 'php_imagick_dyn-Q8.dll' as that is fine for web use and uses less system resources.
3) Place the imagick dll you just downloaded with all the other php extensions (usually something like 'c:\php\ext', there will be loads of them under there). Make sure it has the same security permissions that the other dll files have. IIS specifically needs 'Internet Guest Account (MACHINENAME\IUSR_MACHINENAME)'. I don't know what user Apache runs as so it's best to just make sure it's the same as the others.
4) Install the visual studio 2005 c++ SP1 redistributable package from here
http://www.microsoft.com/downloads/deta ... 9c36f85647 if you don't already have it (which you probably don't). You will need it, it took me several hours to find out I was missing this as the errors that PHP gives are not clear this is what is needed!
5) Edit your php.ini file (this is normally under 'c:\windows\php.ini' and can be edited with notepad) by adding a line to the 'dynamic extensions' section to point to the imagick dll, it will look something like this
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
....
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
....
where we add the line
so it looks something like this (Note: the extension must NOT have a ';' in front of it as that stops PHP from loading it!)
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
....
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
extension=php_imagick_dyn-Q8.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
....
6) Reboot Apache so that the changes to the php.ini file are taken into account.
7) Run the PHP info code. If you don't know how to do this create a PHP file with the following code in it and run it from a browser
this will then give you information on all the modules that PHP is running, as well as some other very useful information. Scroll down the list and look for the block called 'imagick'. Hopefully if all has gone well you'll see it listed
Finally!!!
Sit back and relax as PHP should now be able to run IM via the imagick module. For now I'll leave it there as I think though we should get the above working first! Don't worry the next bit is really really easy