Last modified: 2014-02-08 16:34:58 UTC
I have a weird problem with texvc: texvc is failing on PHP with Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): 0 The debug output gives us TeX: ./math/texvc '/mediawiki/images/tmp' '/mediawiki/images/tmp' '0' 'UTF-8' TeX output: Ccfcd208495d565ef66e7dff9f98764da0 <mn>0</mn>- However, texvc works fine on the command line. The same command above gives me ./math/texvc /mediawiki/images/tmp /mediawiki/images/tmp "0" utf-8 Ccfcd208495d565ef66e7dff9f98764da0<mn>0</mn> So I thought that it may be a permissions issue, but here's what I have: drwxrwxrwx 5 kelvSYC admin 170 Jan 13 20:59 images and inside: drwxrwxrwx 3 kelvSYC admin 102 Jan 13 21:27 math drwxrwxrwx 3 kelvSYC admin 102 Jan 13 21:39 tmp I'm kind of stumped as to why texvc would not be working, considering the webserver has access...
After a little bit of searching (and not knowing much about the language texvc is in), I determined that this is from | _ -> print_string "-" in texvc.ml How render.ml can get this error is beyond me, but the temporary .tex file remains...
I'm facing this problem on a gentoo server. For me, the problem was the environment was empty in the php so the latex shell commands had no effect because they don't call commands from /usr/bin (in my case). The binaries weren't on the PATH :) (it was no PATH set) I made a patch which enables to the user to set the environment of the wfShellExec call from LocalSettings.php Any comments are appreciated. Balazs
Created attachment 10991 [details] Patch for let the user set the environment of the wfShellExec call
Thank you for the patch, Balazs! It will get reviewed faster if you put it directly in our source control system via https://www.mediawiki.org/wiki/Git/Tutorial . I'll try to get a reviewer, though. Thanks again.