Last modified: 2009-08-03 00:54:20 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 T6705, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4705 - Math.php problem -- > Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert)
Math.php problem -- > Failed to parse (PNG conversion failed; check for corre...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.6.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-21 17:27 UTC by engels
Modified: 2009-08-03 00:54 UTC (History)
2 users (show)

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


Attachments

Description engels 2006-01-21 17:27:59 UTC
DETAILS:
texlive is installed at /usr/local/texlive/2005/bin/i386-linux

the apache/php path environment is:

/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/texlive/2005/bin/i386-linux

convert and gs are located at /usr/bin and are thus in the path environment of
apache/php

Thus, latex, dvip, ghostscript, imagemagick (convert) are all in the path
environment of apache/php

php safe mode is off

texlive permissions root:root (does not work either with logged in user or
apache user and group).

When tested at the command line from the math dir this works:
 ./texvc ../images/tmp ../images/math "y=x+3" iso-8859-1
and a perfect png file appears in /images/math. According to the HACKING section
of the math README step 1, 2 and 3 are therefore completing, i.e., 1. texvc gets
called by includes/Math.php 2. texvc does its magic, which is basically to check
for invalid latex code. 3. texvc takes the user input if valid and creates a
latex file containing it. A .tex file is created in images/tmp.

4. is not obviously not happening, i.e., "latex(1) gets called to create a .dvi
file, then a .ps file is created from the .dvi file using dvips(1), and finally
convert(1) creates a .png file from the .ps file.
Comment 1 engels 2006-01-22 10:44:22 UTC
latex can be accessed from mediawiki, the following php

<?php
$output = `latex`;
echo "<pre>$output</pre>";
?>

generates

This is pdfeTeXk, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5)
 %&-line parsing enabled.
**
! End of file on the terminal... why?

which, I presume, fails because of the limited buffer for the backtick operator.

but, the  "Failed to parse (PNG conversion failed; check for correct
installation of latex, dvips, gs, and convert)" still occurs for a page
containing <math>y=x+4</math>.
Comment 2 engels 2006-01-22 20:38:29 UTC
dvips, ghoscript and imagemagick can be similarly accessed by php. However,
mediawiki still fails to render a page
containing <math>y=x+4</math>, producing the same error "Failed to parse (PNG
conversion failed; check for correct installation of latex, dvips, gs, and
convert)".

Comment 3 Brion Vibber 2006-01-22 23:13:12 UTC
Page text is aggressively cached. Please make sure you're not just
wasting your time reloading a cached page over and over. ;)
Comment 4 engels 2006-01-23 03:17:04 UTC
I am purging the page everytime I reload it. 
Comment 5 Buz Cory 2006-03-29 16:07:19 UTC
I don't know about any other site, but on WikiPedia, hardly anything inside
&lt;math&gt; ... &lt;/math&gt; is converted correctly at this time.

I saw it first on the WikiPedia page on Baye's Theorem where much of the math is
displayed as TEX text.

The following is taken verbatim from the "Bayesian spam filtering" page, and
again does not display properly on WikiPedia.

:<math>\Pr(\mathrm{spam}|\mathrm{words}) =
\frac{\Pr(\mathrm{words}|\mathrm{spam})\Pr(\mathrm{spam})}{\Pr(\mathrm{words})}.</math>

Notes:
There seems to be no place to report WikiPedia-specific bugs.

This page lacks a "preview" link, which I would have used if it were there.
Comment 6 Rob Church 2006-03-29 18:13:23 UTC
(In reply to comment #5)
> There seems to be no place to report WikiPedia-specific bugs.
Use this BugZilla and set the product to "Wikimedia" and the component to
"General/Unknown"

> This page lacks a "preview" link, which I would have used if it were there.
This is BugZilla, not MediaWiki. It doesn't have a preview function.
Comment 7 Anton Andrushchenko 2007-10-17 12:22:21 UTC
I had the same problem. Slackware 12 Linux, teTex 3.0
MediaWiki: 1.9.3
PHP: 5.2.3 (apache2handler)
MySQL: 5.0.37 
When I reboot the server and create a new formula in article, I have the same error message. After manually stop httpd and start it, math is rendered correctly.
Comment 8 Brion Vibber 2007-10-17 12:52:47 UTC
Anton, that's sounds like a problem with the system PATH or other environment variables not being set at boot time, but being set in your shell when you restart the web server.
Comment 9 Chad H. 2009-08-03 00:54:20 UTC
Marking INVALID. I can't really find a single bug here that we can fix on our end. It looks like a path or permission issue from re-reading comment #1.

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


Navigation
Links