latex/dragmath render problems

This forum post has been removed

Number of replies: 18
The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by Ian Wild -
Picture of Plugin developers
Hi,

Mimetex isn't working because PHP Safe Mode is on. I might be wrong but I think the recommendation is that safe mode is turned off for Moodle? You can set this using an .htaccess file (assuming your host is running Apache). If there is a problem with safe mode then be careful: some hosts say you can't turn it off.

Hope this helps,

Ian.
In reply to Ian Wild

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by Ian Wild -
Picture of Plugin developers
Hi again,

It seems the error with the LaTeX binaries is either that the paths specified in the TeX filter settings page are wrong or you don't have execute permissions on those files (just thinking about the "not readable" error).

Are you sure that those binaries are actually installed on your server?

Cheers,

Ian.


In reply to Ian Wild

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Ian Wild

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by Marc Grober -
you should probably find an ISP that isn't clueless
until then use asciimath
In reply to Marc Grober

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Ian Wild

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by Mauno Korpelainen -

No it won't work - if you have given Mimetex executable permissions like you have (755) and your server does not allow you to execute commands probably caused by safe mode or your server and php has some other disabled commands that don't allow you to execute mimetex from filter/tex it won't allow you to execute any other distributions any better. Latex binaries must be executable.

I don't know if your host could allow using of some local php.ini file or .htaccess file or some change of possible hardened security settings to allow you locally execute for example that mimetex from filter/tex. If they don't you could try for example

- Mathtran filter that uses external web service from OU - http://moodle.org/mod/data/view.php?d=13&rid=916 and http://www.mathtran.org/wiki/index.php/Main_Page

- JsMath that is a javascript based renderer http://moodle.org/mod/data/view.php?d=13&rid=709 and takes rather lot of hard disk space but does not require tex on server

- AsciiMath that uses MathML for FF which is much cleaner than image output but requires for IE image fallback from some external mimetex, mathtex, mathtran, latexrender etc latex site - or optionally MathPlayer if image fallback is not given - http://docs.moodle.org/en/ASCIIMathML

- You can also use any external equation editors http://moodle.org/mod/forum/discuss.php?d=119252 to produce the tex images (gif or png) and either add those images with image plugin of editor or save and upload those images to your moodledata if you want to be sure that external services don't stop responding.

In reply to Mauno Korpelainen

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by Mauno Korpelainen -

The choice of Mathtran to use \root 3 \of { 1 + x^2 } to render

nth root

is indeed interesting - in normal TeX we would use \sqrt[3]{1+x^2} and in asciimath for example root3{1+x^2}

and different distributions of latex have a couple of similar differences in some other parts...

In reply to Deleted user

Re: latex/dragmath render problems

by enea lucchi -
Hi, plase, could you explain the php.ini in tex folder?
i'm sorry for my bad english

In reply to enea lucchi

Re: latex/dragmath render problems

by Mauno Korpelainen -
You could click the profile of Sal Iacono and try to send a private message to ask what did the local php.ini have inside...

The idea of using local php.ini or .htaccess files is that some hosts have very strict settings of php that do not allow executing of scripts or some functions of php are by default disabled. Safe mode on is usually no-go for moodle - moodle can't work properly if php safe mode is on. On some hosts you need to place local php.ini files to every folder where you don't use global settings (not very reasonable for "normal" sites - usually one php.ini is enough for one site or one host)

Executable files like mimetex.xxx (xxx depends on operation system) need permission to execute but on some hosts setting permissions of files or folder to 755 or even to 777 don't take effect - for example settings of SeLinux can prevent changes (or some other security setting).

I suppose Sal's host had restrictions with disabled functions (of php) but you know better if you ask directly...

And if you don't get any response from Sal you could ask from your host about use of local php.ini files or .htaccess files and about possible restrictions (safe mode or disabled functions for a start) or check your php info... http://docs.moodle.org/en/phpinfo
In reply to Mauno Korpelainen

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: latex/dragmath render problems

by enea lucchi -
thank you very mach for your answer

i have stick php.ini in every folder but not work

i have php5 - lenny on fedora.

do you know how can i check i files tetex-base tetex-bin tetex-extra are installed on my server?
I asked my host but he not answer to me
In reply to enea lucchi

Re: latex/dragmath render problems

by Mauno Korpelainen -

I don't know about Fedora Lenny but my test site is using Debian Lenny and in stable Lenny teTeX is no longer developed upstream, and has been replaced by the TeX Live collection.

On the other hand you might need root access to be able to find files/location of Tetex or TexLive on your host and the only one that can help in that case is your host. If they don't allow you to execute any scripts like mimetex in folder filter/tex even if you have set permissions to 755 and if they don't let you use some local binaries of latex you can't do much for that situation. Sometimes you can use symbolic links to existing files elsewhere on site (in such folders where you are allowed to run scripts - and even most free hosts allow using cgi scripts like mimetex.cgi from cgi folder).

I suppose they might have some security setting enabled (SElinux etc?) that prevents changes to permissions taking action or those disabled functions enabled in php.ini but we don't know your phpinfo or the settings that your host is using. Please contact your host and if they don't answer choose another host... wink

In reply to Ian Wild

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.