[Maxima] embedding maxima in a CGI script

Ben Crowell maximacrowell05@lightandmatter.com
Mon, 3 Oct 2005 23:55:17 +0000


I have a preexisting Perl CGI application (http://www.lightandmatter.com/spotter/spotter.html)
that I would like to interface with maxima. For instance, I'd like to add a little
utility to it for doing integrals, sort of like Wolfram's integrals.com. The app
is something my students use (I teach physics), and it already has a mathematical
input language that my students are used to. The language is not all that different
from Maxima's, but, e.g., it allows implicit multiplication. So the idea is that,
rather than telling them they can go to integrals.com to compute an integral
they don't know how to do, I can have them enter it into my CGI application
in the notation they already know, and my app will then parse it and convert
it to Maxima syntax, and display the result (either as ascii-art math, or
as LaTeX-generated graphics).

Does anyone have any experience with embedding Maxima in a script like this?
For example, I want to make sure there isn't any tricky way for users to
do inappropriate things, like deleting all my files. (OK, since it's going
through my own parser first, it would probably be hard for them to accomplish
that anyway, but I'd still be interested in hearing if anyone else has tackled
the issue of sanitizing input appropriately.) It would also be nice to make
sure they can't inadvertently send my server spinning off on a computation
that will eat up 99% of its CPU for the next month :-)

Thanks in advance for any suggestions!

	Ben Crowell

(Moderator: Sorry about sending this earlier from a different address than the
one from which I was subscribed. I got a message saying that one was awaiting
moderation, since it wasn't from a subscriber. Please delete that one.)