Problems with Maths TEX and Algebra

Problems with Maths TEX and Algebra

by Christopher Cowley -
Number of replies: 6

I am having a lot of trouble getting the TEX and Algebra filters working. when I use the Tex Filter Debug texdebug.php I get the following. does anyone have any idea what is wrong. Thank you in anticipatipation.

Chris Cowley. Finland.

PHP 5, Moodle 1.5.3 Windows 2003 Server IIS6 MySQL 4.2

Warning: system() [function.system]: Unable to fork [E:\moodle-new/filter/tex/mimetex.exe ++ -e "E:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"] in E:\moodle-new\filter\tex\texdebug.php on line 131

Warning: shell_exec() [function.shell-exec]: Unable to execute 'E:\moodle-new/filter/tex/mimetex.exe ++ -e "E:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt" 2>&1' in E:\moodle-new\filter\tex\texdebug.php on line 148

The shell command
E:\moodle-new/filter/tex/mimetex.exe ++ -e "E:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"
returned status = -1
File size of mimetex executable E:\moodle-new/filter/tex/mimetex.exe is 433152
The file permissions are: 100777
The md5 checksum of the file is 84f9f8c2eb29a52d01b17852cfa58fb6
Image not found!

Average of ratings: -
In reply to Christopher Cowley

Re: Problems with Maths TEX and Algebra

by Christopher Cowley -
Ok discovered the answer, give execute rights to cmd.exe for the IUSR_computer
In reply to Christopher Cowley

Re: Problems with Maths TEX and Algebra

by Frédéric LAUJON -

Hello,

i've got the same problem, but where is cmd.exe ?

Fred from France 

In reply to Christopher Cowley

Re: Problems with Maths TEX and Algebra

by Petr Naske -
Hello,

as I saw, problems with TEX filter is very often in this forum. I tried to "install" it with my security manager in our web server and he tried to give execute rights to file cmd.exe for the IUSR_computer. It was good, BUT (!!!)

It is NOT secure solution for using filter, because this cause very easily to everyone start ANY program by using cmd.exe file on server. It is very dangerous.

So, I have the same questions.

IS IT POSSIBLE TO RUN TEX FILTER BY SOME SAFE WAY?
IS THERE ANY COURSE, WHERE TEX FILTER IS USING BY THIS WAY AND WE CAN SEE IT?
DO YOU HAVE ANYONE ANY ADVICE HOW TO USE LOGIC SYMBOLS IN MOODLE COURSES? (is good for me to learn jmaths, algebra filter, tex filter or another solution?).

Thanks, Petr N
In reply to Petr Naske

Re: Problems with Maths TEX and Algebra

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I too have been waiting, searching, etc. but have not found or heard of anything. I submitted a request through the Moodle security site but have not heard anything back. The only possibility that I can think of is to run the mimetex.exe as a cgi and create the link as an img (i.e. <img src=myserver.com/cgi/mimetex.exe...> and then pass it the TeX string but this is less than ideal and I have not had a chance to play with that configuration yet. Good luck and if you (or anyone) has other suggestions I would love to see them posted. Peace.
In reply to Anthony Borrow

Re: Problems with Maths TEX and Algebra

by John Forkosh -
Hi Anthony,
Actually, I think <img src="myserver.com/cgi/mimetex.exe..."> is indeed the "ideal" method. However, as mentioned in the Introduction section of http://www.forkosh.com/mimetex.html , "There's no inherent need to repeatedly write cumbersome <img> tags." It goes on to illustrate a simple one-line fix for phpBB that permits inline expressions containing [ t e x ]...[ / t e x ] to render the ... expression as a mimetex image. And that could just as easily have been $$$...$$$ (like moodle) instead.

But I'm not familiar with moodle code, nor with the mechanism for submitting changes. While it's easy for me to say the moodle fix should be just about as simple as the phpBB fix (i.e., easy for me to say "simple" when somebody else is doing the actual work), mimetex's whole design is based on the idea that such fixes should be pretty straightforward. But Martin, or somebody else familiar with moodle internals, will have to confirm this for moodle. Unfortunately for us, "Zig" seems to be busy with other things these days.

To make mimetex even safer and simpler, instead of <img src="myserver.com/cgi/mimetex.exe..."> you can write <img src="http://www.forkosh.com/mimetex.cgi..."> which uses the public mimetex server running on my ISP. That way, you don't have to install or run mimetex (or any special math software) whatsoever. But you still do need the fix that recognizes $$$...$$$ and generates the corresponding img tag.
John
In reply to Petr Naske

Re: Problems with Maths TEX and Algebra

by Davide Cervone -
The jsMath filter does not require programs to run on your server. It works by running JavaScript on the user's browser. This is safer and easier to install on your server, but the down side is it is slower, as the page must be processed every time it is viewed. So you have to decide whether it is worth the trade-off for you.

Davide