Web Server for Maple


This file explains how to install and configure a web server for Maple. The general architecture is as follow. There is a web server and a remote machine on which Maple is executed (the Maple server). The communication between both servers is done by netclient.


Get the Script

The Perl script maple-cgi.pl can be found here.

How it works?

The Perl script maple-cgi.pl must be installed on the web server. This script does nothing more than formatting and forwarding the HTTP request (either GET or POST method) to a remote Maple server through netclient. The Maple server receives the following command

cgi("httpmethod"="GET"|"POST","cgiurl"=url::string, HTML_ID[1]::string=value[1]::string, ..., HTML_ID[n]::string=value[n]::string);
quit;

This means that the Maple server must implement the function cgi, whose argument is a sequence of string=string. The left string is a HTML identifier, while the right string is its value. Note that the value is returned as a string: the function cgi should first ensure that the value does not contain any hack (such as system or rmdir) and then invoke parse. cgi outputs to STDOUT a valid HTTP response. In particular, the HTTP response must include the HTTP header, which should be one of:

Configuration

In maple-cgi.pl (this is Perl language):

Example of configuration:

### WWW server
$NETCLIENT = "/usr/local/bin/netclient";
$CGIURL = "http://algo.inria.fr/bin/esf";

### Remote Maple server
$MACHINE = "myhost.inria.fr";
$PORT = 2007;

Installation


LM, Created: 05/31/03 - Last update: 10/14/03
Valid HTML 4.01! Valid CSS!