Missing Image

Missing Image

by Frank Szatkowski -
Number of replies: 31
I have upgraded to 1.2 and tex and the algebra filteare installed. However, formulas are showing as missing images. there has to be a simple solution. Any help would be appreciated
Average of ratings: -
In reply to Frank Szatkowski

Re: Missing Image

by Zbigniew Fiedorowicz -
Use the debugging scripts:
  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?
In reply to Zbigniew Fiedorowicz

Re: Missing Image

by Frank Szatkowski -
This is the message I get when running texdebug.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/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!

In reply to Frank Szatkowski

Re: Missing Image

by Zbigniew Fiedorowicz -
The file permissions are: 100664

That's your problem.  The file permissions should be 775 not 664.
In reply to Zbigniew Fiedorowicz

Re: Missing Image

by Peter Honan -

I am having a similar problem but different out...running on 2003 Server/IIS6
I'd love some advice....mixed

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!
In reply to Peter Honan

Re: Missing Image

by Zbigniew Fiedorowicz -
I have no idea whether the tex and algebra filters are capable of running under IIS.  The only Windows environment which I have access to is EasyPHP/Apache/WinXP.  My guess would be that there is some security setting in IIS which prevents the filter scripts from invoking the mimetex.exe binary.  I would suggest asking on the newsgroups
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?
In reply to Zbigniew Fiedorowicz

Re: Missing Image

by Peter Honan -

Got it!! Googled the issue and on hit 783 found an old mail archive on it.dead

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 mixed

In reply to Peter Honan

Re: Missing Image

by Chen ZhongWei -
That's right. But you should change the user to USRS_xxxxxxxx  which is not an internet user, and that it's safer and less dangerous. 
In reply to Chen ZhongWei

Re: Missing Image

by J B -
Could you be more specific about how to achieve this please? We have got tex working when we allow Read\Execute permissions to IUSR_xxxxxxx, but the server admin is very reluctant to set this permanently.

I am being told:

"there is no user account on Windows 2003 along the lines of USRS_xxxxxxx, the only accounts that exist are the administrator account, IUSR_xxxxxxx and IWAM_xxxxxxx"

In reply to J B

Re: Missing Image

by Wyatt Hughes -

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

In reply to Wyatt Hughes

Re: Missing Image

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Despite it being a dated issue - the Win2003/IIS6 system issue for mimetex.exe and aspell.exe is still very real. By USRS_xxxxxxx I believe he was talking about creating a separate user account and calling IUSR_Filter or IUSR_WhatEverYouWantToCallMe. I do not think he was referring to a specific account. The challenge then is to have the page that calls the code to authenticate as that user rather than IUSER_YourMachineName (the default anonymous IIS user account). I attempted with little success to get this to work. I somewhat regret sounding like a Linux fan(atic) but you are only setting yourself up for problems by using Win2003/IIS6 (my current production server). I am investigating the possibilities of porting over to Linux and following the yellow brick road. Peace.
In reply to Anthony Borrow

Re: Missing Image

by J B -
Thanks for all the input on this one, I think I understand now, but solved the problem during the upgrade to 1.6 by migrating to Linux wink
In reply to Peter Honan

Re: Missing Image

by Nina Hämäläinen -
Same problem here, smile
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
In reply to Nina Hämäläinen

Re: Missing Image

by Zbigniew Fiedorowicz -
The error code
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.
In reply to Zbigniew Fiedorowicz

Re: Missing Image

by Anil Sharma -

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

In reply to Zbigniew Fiedorowicz

Re: Missing Image

by Paolo Brunello -
Hi,
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
In reply to Frank Szatkowski

Re: Missing Image

by Javad Mohabat Pour -

Hi

This is the message when i run texdebug.php ...

I actually confuse and need help surprise

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!

In reply to Frank Szatkowski

Re: Missing Image

by Marcin Grinberg -
I have almost the same prob. What Can I do with it? here are the Debug messages.
I wonder if someone could help me solve this problem smile
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
In reply to Marcin Grinberg

Re: Missing Image

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I am having the same issue with Windows Server 2003, IIS 6, and PHP 5.1.2. I have submitted this to security.moodle.org and have not received a response. I am not sure if there is a way to securely accomplish spell checking and the mimetex filter (or anything that is called via system).  I remain open to suggestions.
In reply to Anthony Borrow

Re: Missing Image

by A. H. -
Dear all,
Guess what, I am unable to run any of the filters big grin ! 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
In reply to A. H.

Re: Missing Image

by J B -

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.

In reply to J B

Re: Missing Image

by Davide Cervone -
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

In reply to Davide Cervone

Re: Missing Image

by J B -
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

In reply to J B

Re: Missing Image

by Davide Cervone -
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

In reply to Davide Cervone

Re: Missing Image

by J B -
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.
In reply to J B

Re: Missing Image

by A. H. -
Thank you James. You pointed to something that slipped my mind (rights to cmd.exe).

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
In reply to A. H.

Re: Missing Image

by Miki Alliel -
Picture of Translators
 Hello

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

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 "

In reply to Miki Alliel

Re: Missing Image

by Brennan McCarthy -
I am having a similar problem where i cannot get the moodle image. Upon installation, everytime i tried to continue, it would give me a "page cannot be displayed." my site is www.brennanmccarthy.com/moodle. Please help!
In reply to Brennan McCarthy

Re: Missing Image

by chandra sekar -

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