Tex Filters on shared host

Tex Filters on shared host

על ידי Paul Robinson בתאריך
מספר תגובות: 4

I am experiencing some difficulties getting the tex filter to run.  I have tried reading through some of the similar posts here but cannot see anything abvious to me.  I have Moodle 1.9 running, hosted on a shared linux server.  I ran the debug program with the following results.

1. See the cache_filters database entry for this expression (if any).
 
DB cache_filters entry for f(x)=\\Bigint_{-\\infty}^x~e^{-t^2}dt not found

 
3. Show a graphic image of the algebraic expression rendered with mimetex.
sh: /var/www/html/filter/tex/mimetex.linux: Permission denied
The shell command
"/var/www/html/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/tex/d1e56126337cd6e29b16fe759232ce90.gif" -- '\Large f(x)=\\Bigint_{-\\infty}^x~e^{-t^2}dt'
returned status = 126
File size of mimetex executable /var/www/html/filter/tex/mimetex.linux is 491043
The file permissions are: 100644
The md5 checksum of the file is c294ab11905323bb5cb0f451241bedc1
Image not found!
No text output available
 
4.  Show a graphic image of the algebraic expression rendered with Tex/Ghostscript
 
A 'broken link' image is displayed -  rectangle(s) with red cross in the middle
 
5.  Show command execution output from the algebraic expression rendered with Tex/Ghostscript.
 

Checking executables

Error: latex executable (/usr/local/bin) is not readable
Error: dvips executable (/usr/local/bin) is not readable
convert executable (/usr/bin/convert) is readable

base filename for expression is 'd1e56126337cd6e29b16fe759232ce90'

Processing TeX expression:

f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt
$ /usr/local/bin --interaction=nonstopmode /var/www/moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.tex OUTPUT: RETURN CODE: 126 
$ /usr/local/bin -E /var/www/moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.dvi -o /var/www/moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps OUTPUT: RETURN CODE: 126 
$ /usr/bin/convert -density 240 -trim /var/www/moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps /var/www/moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.gif OUTPUT: RETURN CODE: 1
 
    

If the following image displays correctly, set your Administration->Server->HTTP setting for slasharguments to file.php/1/pic.jpg:

 
    

Otherwise set it to file.php?file=/1/pic.jpg It should display correctly as

 
    

If neither equation image displays correctly, please seek further help at moodle.org at the Mathematics Tools Forum

No text output available 
 
ממוצע דרוגים: -
בתגובה ל: Paul Robinson

Re: Tex Filters on shared host

על ידי Colin Fraser בתאריך
תמונה של Documentation writers תמונה של Particularly helpful Moodlers תמונה של Testers
The sad truth is that in some hosting services, the Hosts do not allow Tex. I suggest they probably have not turned it on so talk to them, see if the programs are available. Also, this line:

File size of mimetex executable /var/www/html/filter/tex/mimetex.linux is 491043
The file permissions are: 100644

looks a little sus to me as well. Does this mean that the file you are making is 491043 bytes and there is a filesize limitation of 100644 bytes? Is this possible even? Can Hosting services limit filesizes like this?

בתגובה ל: Colin Fraser

Re: Tex Filters on shared host

על ידי Paul Robinson בתאריך
Thanks, the host has changed the permission of filter/tex/mimetex.linux so that it can be executed and I can now at least use use this.  They said it was not possible to change permissions for the 'bin' folder. 
בתגובה ל: Paul Robinson

Re: Tex Filters on shared host

על ידי Marc Grober בתאריך
Moodle is looking for two of the required tex binaries (latex and dvips) in /usr/local/bin, and it is unlikely that /usr/local/bin is not readable..... it is more likely that you are pointing Moodle to the wrong location (as Moodle found convert in /usr/bin). I would first change your path for the first two binaries to /usr/bin and see if Moodle finds them. You may also want to actually ask your host where latex and dvips are located as your host may have a different location for such binaries or the binaries may not be installed.

If you have shell access and your host does not have dvips and latex in an open /bin you can likely create your own ~/bin, install appropriate tex binaries and then point your moodle to them. See, e.g. http://www.tug.org/texlive/quickinstall.html