http://yoursite/moodle/filter/tex/texdebug.php
http://yoursite/moodle/filter/algebra/algebradebug.php
What happens when you click on the "Show Image" buttons in these scripts?
sh: /home/szatkows/www/math/filter/tex/mimetex.linux: Permission denied
The shell command
"/home/szatkows/www/math/filter/tex/mimetex.linux" -e "/home/szatkows/www/math/data/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status = 126
File size of mimetex executable /home/szatkows/www/math/filter/tex/mimetex.linux is 757925
The file permissions are: 100664
The md5 checksum of the file is bcd12286593d23bfa7fccc658cb6ef71
Image not found!
This is the message I get when running algebradebug.php
sh: /home/szatkows/www/math/filter/tex/mimetex.linux: Permission denied
The shell command
"/home/szatkows/www/math/filter/tex/mimetex.linux" -e "/home/szatkows/www/math/data/filter/algebra/de06d6c44d98ba4e42dffca988bf530b.gif" '\Large \frac{\sin\left(z\right)}{x^{2}+y^{2}}'
returned status = 126
File size of mimetex executable /home/szatkows/www/math/filter/tex/mimetex.linux is 757925
The file permissions are: 100664
The md5 checksum of the file is bcd12286593d23bfa7fccc658cb6ef71
Image not found!
The file permissions are: 100664
That's your problem. The file permissions should be 775 not 664.
I am having a similar problem but different out...running on 2003 Server/IIS6
I'd love some advice....
algebradebug.php
No text output available The shell command
returned status =
mimetex executable not found!
Image not found!
texdebug.php
The shell command
E:\moodle/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/filter/tex/mimetex.exe is 328192
The file permissions are: 100777
The md5 checksum of the file is 219b6bd7ac1131a54a225794063eed8b
Image not found!
microsoft.public.inetserver.iis
comp.lang.php
comp.lang.perl
on how to get the system() command to work in the IIS environment.
But perhaps there is someone reading this forum who is familiar with IIS and might give you a better answer.
Another thought: what happens when you open a command prompt window on the server machine and invoke mimetex.exe manually?
Got it!! Googled the issue and on hit 783 found an old mail archive on it.
2003 Server has tightened the securities on the "c:\windows\system32\cmd.exe"
You have to allow the IUSR_xxxxxxxx user Read\Execute permissions explicitly on it.
A somewhat dangerous approach though I think
I am being told:
Hi James
I know this post was posted a long time ago, but were you able to find out about this USRS_xxxxxxx user account on Windows 2003, I had the same problem as you and by changing to Read\Execute on IUSR_xxxxxx it started to work, I'm just wondering if by doing this... I'm setting myself up for problems down the road.
Thanks in advance.
Wyatt Hughes
My system:
Fedora core 3
httpd-2.0.52-3.1
php-4.3.11-2.5
moodle/filter/tex/texdebug.php:
sh: /var/www/html/moodle/filter/tex/mimetex.linux: Permission denied
The shell command
"/var/www/html/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status = 126
File size of mimetex executable /var/www/html/moodle/filter/tex/mimetex.linux is 760158
The file permissions are: 100755
The md5 checksum of the file is 06b8db764f0eded2edbbad09a716fa40
Image not found!
moodle/filter/algebra/algebradebug.php:
The shell command
returned status =
mimetex executable not found!
Image not found!
please, help
nina
returned status = 126
appears to be due to selinux being enabled on your server. Selinux provides an extra level of security on programs running on your server in addition to the usual file permissions. However it is a pain to configure properly.
The simplest solution is turn off selinux enforcement on your server. See the following web page on how to do this in Fedora Core 3:
http://fedora.redhat.com/docs/selinux-faq-fc3/index.html
Alternatively you might get a system guru to configure selinux properly to allow Moodle to interact with the mimetex program.
t.nina
I get a perfect image when clicking "show image" on http://yoursite/moodle/filter/tex/texdebug.php
http://yoursite/moodle/filter/algebra/algebradebug.php
but the image does not apear when the same code is inserted in the site anywhere else. All i get in place of the image is a thin straight line. I have set the correct CHMOD permissions, set the variables correctly. Any ideas would be a great help
when I run your debug scripts I get 500 internal server error. All files in the tex and Algebra folders have 777 permissions. Even if they are both activated, I can't have tex notation and algebra filters working in my moodle 1.7
any help?
Paolo
Hi
This is the message when i run texdebug.php ...
I actually confuse and need help
Notice: Undefined variable: status in /home/aiti/public_html/filter/tex/texdebug.php on line 131
Warning: system() has been disabled for security reasons in /home/aiti/public_html/filter/tex/texdebug.php on line 131
Warning: shell_exec() has been disabled for security reasons in /home/aiti/public_html/filter/tex/texdebug.php on line 148
Notice: Undefined variable: status in /home/aiti/public_html/filter/tex/texdebug.php on line 149
The shell command
"/home/aiti/public_html/filter/tex/mimetex.linux" -e "/home/aiti/public_html/moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status =
Notice: Undefined variable: status in /home/aiti/public_html/filter/tex/texdebug.php on line 150
Notice: Undefined variable: status in /home/aiti/public_html/filter/tex/texdebug.php on line 152
Notice: Undefined variable: status in /home/aiti/public_html/filter/tex/texdebug.php on line 154
File size of mimetex executable /home/aiti/public_html/filter/tex/mimetex.linux is 429514
The file permissions are: 100775
The md5 checksum of the file is e14b7159b8738a60e7909226e8edc5ce
Image not found!
I wonder if someone could help me solve this problem
texdebug.php
Warning: system() [function.system]: Unable to fork [Z:\moodle\moodle/filter/tex/mimetex.exe ++ -e "Z:\moodle\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"] in Z:\moodle\moodle\filter\tex\texdebug.php on line 131
Warning: shell_exec() [function.shell-exec]: Unable to execute 'Z:\moodle\moodle/filter/tex/mimetex.exe ++ -e "Z:\moodle\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt" 2>&1' in Z:\moodle\moodle\filter\tex\texdebug.php on line 148
The shell command
Z:\moodle\moodle/filter/tex/mimetex.exe ++ -e "Z:\moodle\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"
returned status = -1
File size of mimetex executable Z:\moodle\moodle/filter/tex/mimetex.exe is 433152
The file permissions are: 100777
The md5 checksum of the file is 84f9f8c2eb29a52d01b17852cfa58fb6
Image not found!
algebradebug.php
Warning: shell_exec() [function.shell-exec]: Unable to execute 'cd Z:\moodle\moodle\filter\algebra & algebra2tex.pl x/2' in Z:\moodle\moodle\filter\algebra\algebradebug.php on line 98
There is a problem with either Perl or the script algebra2tex.pl
Warning: shell_exec() [function.shell-exec]: Unable to execute 'cd Z:\moodle\moodle\filter\algebra & algebra2tex.pl x/2 2>&1' in Z:\moodle\moodle\filter\algebra\algebradebug.php on line 102
Notice: Undefined variable: status in Z:\moodle\moodle\filter\algebra\algebradebug.php on line 103
The shell command
cd Z:\moodle\moodle\filter\algebra & algebra2tex.pl x/2
returned status =
The file permissions of algebra2tex.pl are: 100666
I am using Windows Serwer 2003 with IIS php 5.1.x
Guess what, I am unable to run any of the filters ! Dont think am happy but its just that am going crazy! I am using windows server 2003, IIS 6... I just appreciate any help concerning ANY filter installation/configuration.
However, what i can spare you is going crazy with LDAP authentication / enrollment which i figured out recently and still testing.
Amer
Hi Amer
Our network security bods tell me that giving the internet user execute rights to cmd.exe is a very bad idea indeed, and as there seems to be no other way of implementing these filters I am genuinely disappointed to say that I have abandoned the idea of using the maths filters while we are using windows/IIS on our production server.
I have got these filters working using win/apache and under linux on test servers no problems. I have also tried using the jsmath plugin; nice idea but unfortunately it didn't work well all the time and using it brings a whole lot of javascript issues with it.
I have considered setting up a separate machine to produce images that users can incorporate in webpage assets but it obviously isn't a very neat solution.
I have also tried using the jsmath plugin; nice idea but unfortunately it didn't work well all the time and using it brings a whole lot of javascript issues with it.
Can you say what "it didn't work well all the time" means? As the author of both jsMath and the jsMath filter, I could try to fix the problems if you were to give more details. Also, I'm curious about which JavaScript issues you have in mind.
For those who are not familiar with the jsMath filter, it uses JavaScript in the student's browser to process the mathematics (rather than a program on the server that generates images). This makes installation easier, but does have other potential problems, which James alludes to.
If you are interested in trying it, see my posting at
http://moodle.org/mod/forum/discuss.php?d=43019&parent=197862
Davide
Thanks for your message, I would be very happy to use the plugin. I had a lot of reports of pages throwing javascript errors at that time, although I cannot be sure what their source was as I couldn't replicate the problem, ultimately javascript's implementation is client dependent. In truth I didn't persist with jsMath long enough to find a pattern or solution.
I have just re-enabled the filter and had a look. The filter seems to work fine on a first visit to the page, but if the page is reloaded or revisited it often does nothing, leaving the code visible on the page. Then all of a suddenly the equation will appear again (in IE6, Firefox and Opera).
You may need to log in as guest to see it here: http://virtual.cornwall.ac.uk/course/view.php?id=2
I have just re-enabled the filter and had a look. The filter seems to work fine on a first visit to the page, but if the page is reloaded or revisited it often does nothing, leaving the code visible on the page.
There was a problem with the interaction between the jsMath filter and the caching that Moodle does, which I fxed about 5 weeks ago. It looks like you have a version that is older than that, and might be suffering from that problem.
The issue is that the jsMath filter looks for a special marker on the page to decide if jsMath needs to try to process the page; that marker was inserted by the jsMath filter.php file, but that file does not run of the message is taken from the cache. The solution is to have the filter add the marker onto the message text rather than output it directly, as it had in the earlier verion, so that the tag is part of the cached message.
In the older version, the first time the page shows, the filter.php is run and the jsMath tag is present so the math is properly processed. But if you reload it again immediately (or any time before the cache time-period expires), the message is taken from the cache, and is untagged, so jsmath doesn't try to process it. When the cache expires and you load the page again, the filter.php file runs again and it is (temporarily) tagged again, and so you see the math.
The broken version of the jsMath filter was only available for about two weeks, but you must have gotten it at that time. Try updating the version that you have and see if that doesn't take care of it. Sorry for the bug!
ultimately javascript's implementation is client dependent.
Indeed, I am oh-so-aware of that, as it has been a challenge to keep jsMath running on all the various browsers. I have gone to great pains, however, to make it work in as many as I can, so I would not let the fact that it is javascript hold you back. And if you find problems, please report them. I do try to fix them when they occur.
Davide
It works! Thanks so much for this - I was using a version dated just days before your fix - the whole experience had become very frustrating and I somehow felt that I was destined to disappoint those users who wanted to use equations.
I will inform some interested users and they will give it a wider test, I will report any problems. Thanks again.
I am still interested and appreciate it if someone can guide me how to setup filters / aspell on windows 2003 even if i gave rights to cmd.exe. I will set them up on a server for testing purposes. I think that there's something I am missing. I gave rights and still not functioning.
Thank you in advance,
Amer
I'm having the same problem
running moodle 1.6+ windows server 2003 and IIS
well im trying so much to find a solution to make the tex work and to see the image of the math that I made rather than a broken image
I couldn't fine the premissions( in the security mode) of the IIS user in the cmd.exe file, I found only the Administrators,INTERACTIVE, SERVICE AND SYSTEM
no IIS user or USRS_xxxxxxx or Iuser
what do I do? although this solution of permitting the cmd file semms like a security irruption.
another problem that I found in moodle is when I get to the
- Online Administration Configuration Filters >>Tex settings
I can't see the "save settings" button when I want to set the "Path of latex binary" is it a bug?
do I need to set this parameter of "Path of latex binary" because it is empty' anyway I cann't find the "save settings" button.
Please help with that
thanks
by the way this is the text I get when I enter to the broken image:
" The shell command
C:\Inetpub\wwwroot\moodle/filter/tex/mimetex.exe ++ -e "D:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"
returned status = -1
File size of mimetex executable C:\Inetpub\wwwroot\moodle/filter/tex/mimetex.exe is 433152
The file permissions are: 100777
The md5 checksum of the file is 84f9f8c2eb29a52d01b17852cfa58fb6
Image not found!PHP Warning: system() [function.system]: Unable to fork [C:\Inetpub\wwwroot\moodle/filter/tex/mimetex.exe ++ -e "D:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt"] in C:\Inetpub\wwwroot\moodle\filter\tex\texdebug.php on line 131 PHP Warning: shell_exec() [function.shell-exec]: Unable to execute 'C:\Inetpub\wwwroot\moodle/filter/tex/mimetex.exe ++ -e "D:\moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" "\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt" 2>&1' in C:\Inetpub\wwwroot\moodle\filter\tex\texdebug.php on line 148 "
Hi
Me too having same problem in displaying Tex notation Am using 5..2.Xphp version. Already tried all those methods but no use
Warning: system() [function.system]: Unable to fork [E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam/filter/tex/mimetex.exe ++ -e "E:\HostingSpaces\emsplus.in\emsplus.in/moodledata/filter/tex/9608176195573c30c6beb3cf078fdf66.gif" -- "\Large f(x)=\int_{-\infty}^x~e^{-t^2}dt"] in E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam\filter\tex\texdebug.php on line 140 Warning: shell_exec() [function.shell-exec]: Unable to execute 'E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam/filter/tex/mimetex.exe ++ -e "E:\HostingSpaces\emsplus.in\emsplus.in/moodledata/filter/tex/9608176195573c30c6beb3cf078fdf66.gif" -- "\Large f(x)=\int_{-\infty}^x~e^{-t^2}dt" 2>&1' in E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam\filter\tex\texdebug.php on line 151 The shell command E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam/filter/tex/mimetex.exe ++ -e "E:\HostingSpaces\emsplus.in\emsplus.in/moodledata/filter/tex/9608176195573c30c6beb3cf078fdf66.gif" -- "\Large f(x)=\int_{-\infty}^x~e^{-t^2}dt" returned status = -1 File size of mimetex executable E:\HostingSpaces\emsplus.in\emsplus.in\wwwroot\onlineexam/filter/tex/mimetex.exe is 943027 The file permissions are: 100777 The md5 checksum of the file is 8bb2d0687c94dcecee38fc241db5f565 Image not found! No text output available can any one help me, thanks