Thread:Project:Support desk/Internal server error using ImageMagick .SVG files

I am running mediawiki under Windows IIS7 and having a problem with svg files using ImageMagick

I get the generic “The page cannot be displayed because an internal server error has occurred” error message when trying to view a svg file with thumbnail.

General information

MediaWiki	1.21.2

PHP		5.4.14 (cgi-fcgi)

MySQL		5.5.25

ImageMagic	6.8.7.5 Used the ImageMagick install: ImageMagick-6.8.7-5-Q16-x64-dll.exe

Configuration

I have the file extention svg listed in the $wgFileExtensions = array so I have successfully uploaded a svg file. I have the correct mime types set in IIS 7. IIS 7 Mime Types setting as follows (for IE9) File name extension .svg MIME type image/svg+xml (have to remove this setting to see additional error information)

Localsetting.php -- $wgAllowTitlesInSVG = true;

$wgSVGConverterPath = "C:\Program Files\ImageMagick687Q16";

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "C:\Program Files\ImageMagick687Q16\convert.exe";

$wgMaxShellMemory = 202400;

$wgImageMagickTempDir = "$IP/images/temp";

$wgSVGConverters = array (

'ImageMagick' => '"C:\Program Files\ImageMagick687Q16\convert.exe" -background white -geometry $width $input $output',);

$wgSVGConverter = 'ImageMagick';

$wgImageMagickIdentifyCommand = "C:\Program Files\ImageMagick687Q16\identify.exe";

Additional Error information

wfShellExec: "C:\Program Files\ImageMagick687Q16\convert.exe" -background white -geometry 180 "C:\inetpub\wwwroot\Mediawiki/images/b/bc/Face-grin.svg" "C:\inetpub\wwwroot\MEDIAW~2\images\temp/transform_2143e5317c11-1.png" 2>&1 Backtrace:


 * 0 C:\inetpub\wwwroot\Mediawiki\includes\GlobalFunctions.php(2849): wfDebugDieBacktrace('wfShellExec: "C...')


 * 1 C:\inetpub\wwwroot\Mediawiki\includes\media\SVG.php(181): wfShellExec('"C:\Program Fil...', '')


 * 2 C:\inetpub\wwwroot\Mediawiki\includes\media\SVG.php(135): SvgHandler->rasterize('C:\inetpub\wwwr...', 'C:\inetpub\wwwr...', 180, 180)


 * 3 C:\inetpub\wwwroot\Mediawiki\includes\filerepo\file\File.php(941): SvgHandler->doTransform(Object(LocalFile), 'C:\inetpub\wwwr...', '/images/thumb/b...', Array)


 * 4 C:\inetpub\wwwroot\Mediawiki\includes\specials\SpecialListfiles.php(195): File->transform(Array)


 * 5 C:\inetpub\wwwroot\Mediawiki\includes\Pager.php(1012): ImageListPager->formatValue('thumb', 'Face-grin.svg')


 * 6 C:\inetpub\wwwroot\Mediawiki\includes\Pager.php(434): TablePager->formatRow(Object(stdClass))


 * 7 C:\inetpub\wwwroot\Mediawiki\includes\specials\SpecialListfiles.php(48): IndexPager->getBody


 * 8 C:\inetpub\wwwroot\Mediawiki\includes\SpecialPage.php(613): SpecialListFiles->execute(NULL)


 * 9 C:\inetpub\wwwroot\Mediawiki\includes\SpecialPageFactory.php(487): SpecialPage->run(NULL)


 * 1) 10 C:\inetpub\wwwroot\Mediawiki\includes\Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))


 * 1) 11 C:\inetpub\wwwroot\Mediawiki\includes\Wiki.php(565): MediaWiki->performRequest


 * 1) 12 C:\inetpub\wwwroot\Mediawiki\includes\Wiki.php(458): MediaWiki->main


 * 1) 13 C:\inetpub\wwwroot\Mediawiki\index.php(59): MediaWiki->run


 * 1) 14 {main}

As you can see I have set the TMP environment variable to the images\temp directory under the MediaWiki directory, so IIS has access to the .png temp files being created as well as the Face-grin.svg file. My not be needed, but was recommended to me. The temp files are being created and wfShellExec: line will run in the servers command prompt. Grrr…. What am missing? Help appreciated!