Topic on Project:Support desk

Error creating thumbnail; limit.sh command not found

2
81.62.89.232 (talkcontribs)

Hi All

I am trying to install a SVG Converter. When I test it I get the Error creating thumbnail: Message. My installed software:

  • MediaWiki 1.21.6
  • PHP 5.4.4-14+deb7u8 (apache2handler)
  • MySQL 5.5.35-0+wheezy1

My LocalSettings.php is:

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

# Tex Umgebung für Formeln
$wgUseTeX = true;
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

# SVG Grafiken
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'inkscape';
$wgMaxShellMemory  = 300000;

In the debug log is the following entry:

File::transform: Doing stat for mwstore://local-backend/local-thumb/b/bd/Test.svg/495px-Test.svg.png
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/bd/Test.svg/495px-Test.svg.png does not exist.
SvgHandler::doTransform: called wfMkdirParents(/tmp)
SvgHandler::rasterize: inkscape -z -w 495 -f '/var/www/wikiMDB/images/b/bd/Test.svg' -e '/tmp/transform_1fbafc584dd1-1.png' 2>&1
wfShellExec: /bin/bash '/var/www/wikiMDB/includes/limit.sh' 'inkscape -z -w 495 -f '\''/var/www/wikiMDB/images/b/bd/Test.svg'\'' -e '\''/tmp/transform_1fbafc584dd1-1.png'\'' 2>&1' 'MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=300000; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180'
[thumbnail] Removing bad 0-byte thumbnail "/tmp/transform_1fbafc584dd1-1.png". unlink() succeeded
[thumbnail] thumbnail failed on hw-kkp7dmz: error 2 "" from "inkscape -z -w 495 -f '/var/www/wikiMDB/images/b/bd/Test.svg' -e '/tmp/transform_1fbafc584dd1-1.png' 2>&1"

In addition I have the following entry in the apache2 error.log:

/var/www/wikiMDB/includes/limit.sh: line 8: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 14: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 17: $'\r': command not found
/var/www/wikiMDB/includes/limit.sh: line 57: syntax error near unexpected token `$'{\r''
/var/www/wikiMDB/includes/limit.sh: line 57: `cleanup() {
'

Is there a Bug in the limit.sh File?

Thanks, Henry

MarkAHershberger (talkcontribs)

Just looking at the error, it looks like you may have uploaded it from a Windows box and the CRLF line endings are confusing the shell interpreter.

Reply to "Error creating thumbnail; limit.sh command not found"