Dear All,
I've just finished installing mediawiki. Everything went fine, except for the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing something? Sincerely,
Bruno
This is most likely what is covered in the readme file. Read the troubleshooting section, you need to install AMS. http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README?view=mark...
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment Project, and Wiki-Tools.com
Bruno Goncalves wrote:
Dear All,
I've just finished installing mediawiki. Everything went fine, except for the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing something? Sincerely,
Bruno
Hi Dan,
This is most likely what is covered in the readme file. Read the
troubleshooting section, you need to install AMS.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README?view=mark...
I had tried following the trouble shooting suggestions... As far as I can tell, everything should work. I have a full LaTeX installation, since that's what I normally use to typeset my papers. I can run texvc correctly as the web server's user, it can read and write from /var/www/html/wiki/math and /var/www/html/wiki/images/tmp. I've even tried to follow the "hacking" suggestions to see if I could figure it out, but to no avail... Although I have noticed that when I run texvc by hand it creates the aux, tex, etc... files (I've commented out the deletion part of render.ml) and when it's run through wikimedia it doesn't. My guess is that it isn't even calling texvc...
Does any of the more experienced users have any suggestions? Thank you!
Bruno
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment
Project, and Wiki-Tools.com
Bruno Goncalves wrote:
Dear All,
I've just finished installing mediawiki. Everything went fine, except
for
the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing
something?
Sincerely,
Bruno
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I've gone through some of this recently, so here's what I remember.
- you have to have dvipng installed, in addition to LaTex - if texvc is not run you see a red box telling you so where you'd normally expect math equations to appear. - by default Math.php runs ./math/texvc. You've to make sure that that file exists and is executable (and works). alternatively you can set $wgTexvc to the path of your system installed texvc - and of course you have to set $wgUseTex to true
I think the above was all I had to do for having math on my hosted wiki. In my case the problem was that the texvc I was uploaded was compiled for 64bit, while my shared server is a 32 bit machine, so even though the executable was there in the right place it was not that helpful.
hth
Maurizio
On Aug 7, 2007, at 12:12 PM, Bruno Goncalves wrote:
Hi Dan,
This is most likely what is covered in the readme file. Read the
troubleshooting section, you need to install AMS.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README? view=markup
I had tried following the trouble shooting suggestions... As far as I can tell, everything should work. I have a full LaTeX installation, since that's what I normally use to typeset my papers. I can run texvc correctly as the web server's user, it can read and write from /var/www/html/wiki/math and /var/www/html/wiki/images/tmp. I've even tried to follow the "hacking" suggestions to see if I could figure it out, but to no avail... Although I have noticed that when I run texvc by hand it creates the aux, tex, etc... files (I've commented out the deletion part of render.ml) and when it's run through wikimedia it doesn't. My guess is that it isn't even calling texvc...
Does any of the more experienced users have any suggestions? Thank you!
Bruno
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment
Project, and Wiki-Tools.com
Bruno Goncalves wrote:
Dear All,
I've just finished installing mediawiki. Everything went fine, except
for
the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing
something?
Sincerely,
Bruno
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
Hi Maurizio,
- you have to have dvipng installed, in addition to LaTex
I do.
- if texvc is not run you see a red box telling you so where you'd
normally expect math equations to appear.
I see red letters saying "*Failed to parse (unknown error): \sqrt{n}"*
- by default Math.php runs ./math/texvc. You've to make sure that
that file exists and is executable (and works).
I've ran it by hand (as the server user) and it runs fine.
alternatively you can set $wgTexvc to the path of your system
installed texvc
- and of course you have to set $wgUseTex to true
of course.
one more thing: the fact that you don't see auxiliary files is normal: Math.php deletes them after running texvc. If you go into that file you'll find comments on how to prevent this deletions (for debugging purposes)
I have modified texvc so as not to delete the auxiliary files. I couldn't find anywhere on Math.php where it did this.
Any more ideas? Thanks!
Bruno
hth
MaurizioOn Aug 7, 2007, at 12:12 PM, Bruno Goncalves wrote:
Hi Dan,
This is most likely what is covered in the readme file. Read the
troubleshooting section, you need to install AMS.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README? view=markup
I had tried following the trouble shooting suggestions... As far as I can tell, everything should work. I have a full LaTeX installation, since that's what I normally use to typeset my papers. I can run texvc correctly as the web server's user, it can read and write from /var/www/html/wiki/math and /var/www/html/wiki/images/tmp. I've even tried to follow the "hacking" suggestions to see if I could figure it out, but to no avail... Although I have noticed that when I run texvc by hand it creates the aux, tex, etc... files (I've commented out the deletion part of render.ml) and when it's run through wikimedia it doesn't. My guess is that it isn't even calling texvc...
Does any of the more experienced users have any suggestions? Thank you!
Bruno
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment
Project, and Wiki-Tools.com
Bruno Goncalves wrote:
Dear All,
I've just finished installing mediawiki. Everything went fine, except
for
the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing
something?
Sincerely,
Bruno
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
On Aug 7, 2007, at 1:08 PM, Bruno Goncalves wrote:
Hi Maurizio,
- you have to have dvipng installed, in addition to LaTex
I do.
- if texvc is not run you see a red box telling you so where you'd
normally expect math equations to appear.
I see red letters saying "*Failed to parse (unknown error): \sqrt{n}"*
This means that texvc is run but Math.php doesn't understand the returned HTML or (more likely) you get no output from texvc. In Math.php line 69 you can print the variable $content and see what it looks like. If you're under Windows I'd investigate the communication between PHP and the subprocess running texvc.
I have modified texvc so as not to delete the auxiliary files. I couldn't find anywhere on Math.php where it did this.
You're right. That's in texvc. Bad memory.
Any more ideas?
I'm afraid not. Unfortunately I don't know much of PHP and I have to fight my way through these things by trial and error.
Hi Maurizio,
Things keep getting stranger and stranger... indeed, I'm not getting any output from the texvc command, although the command itself seems to be correct:
TeX: ./math/texvc '/var/www/html/wiki/images/tmp' '/var/www/html/wiki/images/tmp' '\sqrt{n^2}' 'UTF-8' TeX output:
--- OutputPage::sendCacheControl: private caching; ** Request ended normally [bgoncalves@azrael wiki]$
And if I run the command manually from the wiki directory, it works fine:
[bgoncalves@azrael wiki]$ pwd /var/www/html/wiki [bgoncalves@azrael wiki]$ ./math/texvc '/var/www/html/wiki/images/tmp' '/var/www/html/wiki/images/tmp' '\sqrt{n^2}' 'UTF-8' +7db31f1ef8b4b7d1bfcc94576455fa0a[bgoncalves@azrael wiki]$
with the png image ending up in /var/www/html/wiki/images/tmp. Anything else you can think of? Thanks for all the help!
Bruno
On 8/7/07, Maurizio Vitale maurizio.vitale@polymath-solutions.com wrote:
On Aug 7, 2007, at 1:08 PM, Bruno Goncalves wrote:
Hi Maurizio,
- you have to have dvipng installed, in addition to LaTex
I do.
- if texvc is not run you see a red box telling you so where you'd
normally expect math equations to appear.
I see red letters saying "*Failed to parse (unknown error): \sqrt{n}"*
This means that texvc is run but Math.php doesn't understand the returned HTML or (more likely) you get no output from texvc. In Math.php line 69 you can print the variable $content and see what it looks like. If you're under Windows I'd investigate the communication between PHP and the subprocess running texvc.
I have modified texvc so as not to delete the auxiliary files. I couldn't find anywhere on Math.php where it did this.
You're right. That's in texvc. Bad memory.
Any more ideas?
I'm afraid not. Unfortunately I don't know much of PHP and I have to fight my way through these things by trial and error.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Aug 7, 2007, at 3:34 PM, Bruno Goncalves wrote:
Hi Maurizio,
Things keep getting stranger and stranger... indeed, I'm not getting any output from the texvc command, although the command itself seems to be correct:
TeX: ./math/texvc '/var/www/html/wiki/images/tmp' '/var/www/html/wiki/images/tmp' '\sqrt{n^2}' 'UTF-8' TeX output:
OutputPage::sendCacheControl: private caching; ** Request ended normally [bgoncalves@azrael wiki]$
And if I run the command manually from the wiki directory, it works fine:
[bgoncalves@azrael wiki]$ pwd /var/www/html/wiki [bgoncalves@azrael wiki]$ ./math/texvc '/var/www/html/wiki/images/tmp' '/var/www/html/wiki/images/tmp' '\sqrt{n^2}' 'UTF-8' +7db31f1ef8b4b7d1bfcc94576455fa0a[bgoncalves@azrael wiki]$
with the png image ending up in /var/www/html/wiki/images/tmp. Anything else you can think of?
Two things I'd still try: - I remember having read somewhere that one of the programs involved (possibly dvipng) is bad at reporting errors. Just to be sure, make the tmp and dest directory world writeable. If this fix the problem you have an issue w/ the user-id of the Apache server or the PHP interpreter (which I believe could be different depending on (F)CGI vs. mod_php, but here we're well outside my knowledge).
- 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.
Other than that, I wouldn't know and you'll have to wait for others, Best regards,
Maurizio
Dear All,
Two things I'd still try:
- I remember having read somewhere that one of the programsinvolved (possibly dvipng) is bad at reporting errors. Just to be sure, make the tmp and dest directory world writeable.
I had tried that already... it's one of the first things I check.
If this fix the problem you have an issue w/ the user-id
of the Apache server or the PHP interpreter (which I believe could be different depending on (F)CGI vs. mod_php, but here we're well outside my knowledge).
- try to replace texvc with a shell script that echoes the resultyou 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 ---
As expected. Is there anyway of forcing texvc to be more verbose and say exactly what it is trying to do, which programs is calling, etc? Anybody else has any ideas? Thanks!
Bruno
On Aug 8, 2007, at 11:54 AM, Bruno Goncalves wrote:
Dear All,
- try to replace texvc with a shell script that echoes theresult 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
what OS are you running your server on?
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 theresult 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
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... 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 theresult 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
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 theresult 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
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 theresult 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
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
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
one more thing: the fact that you don't see auxiliary files is normal: Math.php deletes them after running texvc. If you go into that file you'll find comments on how to prevent this deletions (for debugging purposes)
On Aug 7, 2007, at 12:12 PM, Bruno Goncalves wrote:
Hi Dan,
This is most likely what is covered in the readme file. Read the
troubleshooting section, you need to install AMS.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/math/README? view=markup
I had tried following the trouble shooting suggestions... As far as I can tell, everything should work. I have a full LaTeX installation, since that's what I normally use to typeset my papers. I can run texvc correctly as the web server's user, it can read and write from /var/www/html/wiki/math and /var/www/html/wiki/images/tmp. I've even tried to follow the "hacking" suggestions to see if I could figure it out, but to no avail... Although I have noticed that when I run texvc by hand it creates the aux, tex, etc... files (I've commented out the deletion part of render.ml) and when it's run through wikimedia it doesn't. My guess is that it isn't even calling texvc...
Does any of the more experienced users have any suggestions? Thank you!
Bruno
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment
Project, and Wiki-Tools.com
Bruno Goncalves wrote:
Dear All,
I've just finished installing mediawiki. Everything went fine, except
for
the TeX configuration... I've successfully compiled texvc and it runs correctly from the command line. However, typing
<math>\sqrt{n}</math>
in a post, results in:
*Failed to parse (unknown error): \sqrt{n}*** I've set $wgTexvc, $wgUseTeX and $wgEnableUploads. Am I missing
something?
Sincerely,
Bruno
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@lists.wikimedia.org