Page MenuHomePhabricator

Permissions issues with texvc
Closed, DeclinedPublic

Description

Author: kelvSYC

Description:
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...


Version: unspecified
Severity: normal
OS: Mac OS X 10.4
Platform: Macintosh

Details

Reference
bz8625

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:35 PM
bzimport added a project: Math.
bzimport set Reference to bz8625.
bzimport added a subscriber: Unknown Object (MLST).

kelvSYC wrote:

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...

varbalazs+mediawiki wrote:

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

varbalazs+mediawiki wrote:

Patch for let the user set the environment of the wfShellExec call

Attached:

sumanah wrote:

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.