Last modified: 2009-08-03 00:54:20 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.
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>.
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)".
Page text is aggressively cached. Please make sure you're not just wasting your time reloading a cached page over and over. ;)
I am purging the page everytime I reload it.
I don't know about any other site, but on WikiPedia, hardly anything inside <math> ... </math> 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.
(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.
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.
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.
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.