If anyone has successfully configured their wiki to work with ImageMagick on a windows platform, I could use a few moments of guidance. I'm trying to set up the thumbnailing functionality, but every time I test it, I can't get ImageMagick to write the file.
I'm running a development environment on my laptop with the following components:
Windows 2000 Workstation Apache 2.0.50 MySql 4.0.20a-debug PHP 4.3.8 MediaWiki 1.2.6 ImageMagick 6.0.4-Q16
Here's the error I get:
------- Warning: stat(): Stat failed for c:\inetpub\wwwroot\wiki/images/thumb/2/2d/50px-test.jpg (errno=2 - No such file or directory) in c:\inetpub\wwwroot\wiki\includes\Skin.php on line 1634 Warning: unlink(c:\inetpub\wwwroot\wiki/images/thumb/2/2d/50px-test.jpg): No such file or directory in c:\inetpub\wwwroot\wiki\includes\Skin.php on line 1638 -------
The directory path it's using is correct. The file it's looking for, however, doesn't exist, and I assume that the problem is in how I configured my settings file to use ImageMagick.
Here's the ImageMagick lines from localSettings.php:
## To enable image uploads, make sure the 'images' directory ## is writable, then uncomment this: $wgDisableUploads = false; $wgUseImageResize = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "c:\program files\ImageMagick-6.0.4-Q16";
I'm a wiki and php neophyte... Can someone offer some tips to help solve this configuration problem?
Thanks,
Kenneth Rainey
Kenneth Rainey wrote:
If anyone has successfully configured their wiki to work with ImageMagick on a windows platform, I could use a few moments of guidance. I'm trying to set up the thumbnailing functionality, but every time I test it, I can't get ImageMagick to write the file.
[snip]
$wgImageMagickConvertCommand = "c:\program files\ImageMagick-6.0.4-Q16";
That looks like a directory; you want it to point directly at the convert command (probably convert.exe). Also note that PHP double-quoted strings, like C strings, consider the backslash \ to be a special character. To be safe you should always double it \ or it will fail when the following letter makes up a special escape sequence.
I'm also not sure that a command with spaces in it will work, but I'm not sure. (Windows is weird... :) You might have to put it inside quotes itself.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org