Problem with algebra filter

Problem with algebra filter

by John Hansknecht -
Number of replies: 7
I am having problems getting the algebra filter to work properly. Here are the details, I would appreciate any suggestions.

Running on Redhat Enterprise Linux 3
Apache 2.0.46-44
PHP 4.3.2-19
perl 5.8.0-88.9
Moodle version 1.3.4
pix.php v1.8
mimeTex v1.4

Everything works fine in the texdebug.php page

algebradebug.php reports:
First Stage Translation "No Text Output Available"
Second Stage Translation "No Text Output Available"
Show Image  - a very long string of errors I could upload if it will help? Best on my reading of the forum until we get First and Second stage translation working this won't help?

If I manually run ./algebra2tex.pl x/2 the output is \frac{x}{2}

The permissions on algrebra2tex.pl are -rwx-rwsr-x

If you need any more information please let me know. I would love to get this working for our math department.
Average of ratings: -
In reply to John Hansknecht

Re: Problem with algebra filter

by Zbigniew Fiedorowicz -
Get the latest version of algebradebug.php here: http://cvs.sourceforge.net/viewcvs.py/*checkout*/moodle/moodle/filter/algebra/algebradebug.php?rev=1.12
and let me know what errors are reported.

In reply to Zbigniew Fiedorowicz

Re: Problem with algebra filter

by John Hansknecht -
Thank you for the quick response and hurrah, the problem is fixed! The issue was my use of setgid on the algebra2tex.pl script which apparently prevents setuid??? In any case I download your updated algebradebug.php and change prermissions. I still got an error with the stage one tex translation which I have copied below. When I saw the "Can't do setuid" and the "The file permissions of algebra2tex.pl are: 102775" it occurred to me that the permissions on the algebra2tex.pl script might be the problem. I dropped the setgid on the algebra2tex.pl file and the script now works correctly. I still need to test use of the conversion our our live moodle pages but I am hopeful that with the debug script working the live site will work as well.

Error message from Stage One Tex Translation
There is a problem with either Perl or the script algebra2tex.pl
Can't do setuid" and the

Notice: Undefined variable: status in /home/studentuofdjesuitssl/html/moodle/filter/algebra/algebradebug.php on line 115
The shell command
cd /home/studentuofdjesuitssl/html/moodle/filter/algebra; ./algebra2tex.pl x/2
returned status =
The file permissions of algebra2tex.pl are: 102775
In reply to John Hansknecht

Re: Problem with algebra filter

by Zbigniew Fiedorowicz -
The permissions on algrebra2tex.pl are -rwx-rwsr-x

This is a bit strange - you are running algebra2tex.pl setgid.  I don't see why it might cause trouble, but try changing permissions to -rwx-rwxr-x, i.e. chmod 775
In reply to Zbigniew Fiedorowicz

Re: Problem with algebra filter

by Ger Tielemans -

Tex is working,Algebra not. Your new debug script says:

There is a problem with either Perl or the script algebra2tex.pl
Can't locate HTML/Entities.pm in @INC (@INC contains: . /usr/lib/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl) at AlgParser.pm line 9. BEGIN failed--compilation aborted at AlgParser.pm line 9. Compilation failed in require at ./algebra2tex.pl line 4. BEGIN failed--compilation aborted at ./algebra2tex.pl line 4.
The shell command
cd /server/www/secure-html/moodle/filter/algebra; ./algebra2tex.pl x/2
returned status =
The file permissions of algebra2tex.pl are: 100775

In reply to Ger Tielemans

Re: Problem with algebra filter

by Zbigniew Fiedorowicz -
You need to install the Perl module HTML::Entities from www.cpan.org
See this discussion:
http://moodle.org/mod/forum/discuss.php?d=13800
Average of ratings: Useful (1)