Last modified: 2013-01-06 11:36:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24230, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22230 - PdfHandler: Thumbnail creation fails
PdfHandler: Thumbnail creation fails
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
PdfHandler (Other open bugs)
unspecified
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-22 21:40 UTC by scopsen
Modified: 2013-01-06 11:36 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description scopsen 2010-01-22 21:40:08 UTC
When uploading a PDF file the thumbnail and pages are not generated giving the following error instead of the image (I've tried different PDFs):

----
Error creating thumbnail: convert: no decode delegate for this image format `/tmp/magick-XXY76lVk'.
convert: missing an image filename `/var/www/w/images/thumb/8/84/Poster.pdf/page1-424px-Poster.pdf.jpg'.
----

Some debugging seems to show that Ghostscript may be to blame. If writing the Ghostscript output to a file instead of piping it to convert in the PHP script I get:

----
Unrecoverable error: stackunderflow in .setdistillerparams
----

Issueing the same command from the command line works fine and produces a thumbnail:

----
('/usr/bin/gs' -sDEVICE=jpeg -sOutputFile=- -dFirstPage=1 -dLastPage=1 -r150 -dBATCH -dNOPAUSE -q '/var/www/w/images/8/84/Poster.pdf' | sudo '/usr/bin/convert' -depth 8 -resize 424 - '/var/www/w/images/thumb/8/84/Poster.pdf/page1-424px-Poster.pdf.jpg') 2>&1
----

Software:
Linux 2.6.26-2-vserver-amd64
gs-gpl 8.62.dfsg.1-3.2lenny1
imagemagick 7:6.3.7.9.dfsg2-1~lenny3
php5-cgi 5.2.6.dfsg.1-1+lenny4


How can I further debug?
Hope you can help!

matsch
Comment 1 Platonides 2010-01-22 21:42:52 UTC
Why are you using sudo for calling imagemagick?

If from commandline works but from mediawiki doesn't, you may need to increase their allowed memory.
http://www.mediawiki.org/wiki/Manual:$wgMaxShellMemory
Comment 2 scopsen 2010-01-22 21:56:26 UTC
Ok, that solves the problem!

Isn't 100MB already pretty high? What would be a decent value here?

Thanks a lot!
matsch

P.S.: The sudo just slipped through...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links