Hi Maurizio,
Problem solved. Turns out it was just SELinux getting in the way. If you hadn't suggested it, it would never have crossed my mind. As soon as I tinkered with it a little bit, everything started working as expected. Thank you for all the time you spent working with me on this. Grazie mille!
Bruno
On 8/9/07, Maurizio Vitale maurizio.vitale@polymath-solutions.com wrote:
Try to discover how you're executing PHP and whether there's a setting to be enabled for allowing subprocesses to run (it is a potential security risk, so there might be a knob somewhere controlling it). Trying to serve a php file with something similar to
<?php $ls=`ls`; echo "$ls\n"; ?>
might help you discovering whether subprocesses are run or not.
If you're running security enhanced linux you might have a host of other reasons why things fail. I know nothing of this, but there might be traces in system logs about what goes wrong.
On Aug 9, 2007, at 6:24 PM, Bruno Goncalves wrote:
Hi Maurizio,
I tried adding the Sys.... to texvc.ml and recompile... the file was never created. I had also tried to modify render.ml to include the full paths for each tool and redirect stdout and stderr to a file instead of /dev/ null, nothing happened (except when I run texvc by hand, of course). It seems that texvc is not actually being run. I just wish I knew why...
Bruno
On 8/9/07, Maurizio Vitale maurizio.vitale@polymath-solutions.com wrote:
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@gmail.com wrote:
On 8/8/07, Maurizio Vitale <maurizio.vitale@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@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@gmail.com Phone: (404) 712-2441 Fax: (404) 727-0873
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
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@gmail.com Phone: (404) 712-2441 Fax: (404) 727-0873
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l