[Mediawiki-l] texvc

Maurizio Vitale maurizio.vitale at polymath-solutions.com
Thu Aug 9 22:11:48 UTC 2007


On Aug 9, 2007, at 5:46 PM, Bruno Goncalves wrote:

> Dear All,
>
> Any ideas? Texvc still refuses to work from inside mediawiki, but  
> if I run
> the command that shows up in the debug file, it runs fine.
> I've modified render.ml so it doesn't delete the tex. aux, etc..  
> files. When
> texvc is run "by hand" the files are where you would expect them,  
> but when
> running from within mediawiki they are not created. My guess is  
> that for
> some reason texvc isn't even being executed (although setting
> $wgTexvc='/bin/echo' works as expected). Any ideas? Without tex  
> support
> mediawiki is useless to me...

Well, I think from the symptoms seen up to now that texvc does run.
None of the files that it deletes are created by texvc itself(some  
are from latex,
some from dvips, maybe some from dvipng), so the fact they're not  
there doesn't
mean texvc doesn't run.

If you want to be sure that texvc does run, have it modify the state.
You could log stuff, but I don't know how I/O is redirected or you  
could add
something like:
	Sys.command ("touch /tmp/texvc_has_run");
to texvc.ml (the line after 'let _ =' is a good place)
[and recompile, of course]
if after rendering a page with <math></math> tags you find tat file  
in /tmp
you can be sure that texvc has indeed been run.

Another thing that may be happening is that texvc cannot execute  
subprograms
because of the PATH setting.
If you have latex, dvips or dvipng in strange places and you reach  
them because
of some weird setting of your PATH variable then you're out of luck:
texvc assumes they are on the exec path, but when run through PHP the  
PATH
is not the same as your user path.

Please have a look at these two things and report back how is going.

> Sincerely,
>
> Bruno
>
> On 8/8/07, Bruno Goncalves <bgoncalves at gmail.com> wrote:
>>
>>
>>
>> On 8/8/07, Maurizio Vitale <maurizio.vitale at polymath- 
>> solutions.com> wrote:
>>>
>>>
>>>
>>> On Aug 8, 2007, at 11:54 AM, Bruno Goncalves wrote:
>>>
>>>> Dear All,
>>>>
>>>>>
>>>>>         - try to replace texvc with a shell script that echoes the
>>>>> result
>>>>> you get from the command line.
>>>>>           This way you can try to isolate the problem and know for
>>>>> sure
>>>>> whether it is a subprocess communication
>>>>>            issue.
>>>>
>>>>
>>>> setting $wgTexvc to be '/bin/echo' I get:
>>>>
>>>> TeX: /bin/echo '/var/www/html/wiki/images/tmp'
>>>> '/var/www/html/wiki/images/tmp' '
>>>> n^2' 'UTF-8'
>>>> TeX output:
>>>>  /var/www/html/wiki/images/tmp /var/www/html/wiki/images/tmp n^2  
>>>> UTF-8
>>>
>>>>
>>>
>>> I should have been clearer. What I meant was to point $wgTexvc to an
>>> executable file containing something like:
>>>
>>>    #!/bin/sh
>>>    echo "the output you're getting from the command line invocation"
>>>    exit 0
>>
>>
>> humm... this just keeps getting stranger...
>>
>> if I run the same texvc command by hand I get as output:
>> "+7db31f1ef8b4b7d1bfcc94576455fa0a";
>> Using :
>>
>> #!/bin/sh
>> echo "+7db31f1ef8b4b7d1bfcc94576455fa0a";
>> exit 0;
>>
>> I get the same error. However, if I edit includes/Math.php and add
>>
>> $contents="+7db31f1ef8b4b7d1bfcc94576455fa0a";
>>
>> just after the
>>
>> $contents=`$cmd`;
>>
>> line (in effect overriding it), it works fine. So it seems to me  
>> that, for
>> some reason, Math.php is able to receive the output directly from  
>> echo (if
>> I set $wgTexcv to /bin/echo", but not from texvc directly or a  
>> shell script.
>> I'm totally clueless at this point.
>>
>> what OS are you running your server on?
>>
>>
>> Red Hat Enterprise Linux 4
>>
>>  Hope somebody else out there has any ideas.
>> Thanks!
>>
>> Bruno
>>
>>
>> --
>> *******************************************
>> Bruno Miguel Tavares Goncalves, MS
>> PhD Candidate
>> Emory University
>> Department of Physics
>> Office No. N117-C
>> 400 Dowman Drive
>> Atlanta, Georgia 30322
>> Homepage: www.bgoncalves.com
>> Email: bgoncalves at gmail.com
>> Phone: (404) 712-2441
>> Fax:   (404) 727-0873
>> *******************************************
>>
>
>
>
> -- 
> *******************************************
> Bruno Miguel Tavares Goncalves, MS
> PhD Candidate
> Emory University
> Department of Physics
> Office No. N117-C
> 400 Dowman Drive
> Atlanta, Georgia 30322
> Homepage: www.bgoncalves.com
> Email: bgoncalves at gmail.com
> Phone: (404) 712-2441
> Fax:   (404) 727-0873
> *******************************************
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l




More information about the MediaWiki-l mailing list