Here is the FAQ, or Frequently Asked Questions for WITM.
Question: Does WITM come with software that I can install on my PDA to access Mathematica?
- Answer: No, this is because you do not need any extra software on your PDA, PC, smartphone or anything else you want to use. You need a browser, but that is probably already installed. WITM is only installed on the server which has Mathematica installed - not on the computer you wish to use to access Mathematica.
- Answer: Easy is a relative term, but installing WITM requires that you have a reasonable knowledge of UNIX, how to configure a web server, and can appreciate the security issues. It is not for a beginner to install.
- Answer: It depends. Since there are some differences between how you will need to structure your commands on WITM compared to using the notebook interface of Mathematica, you could argue it is better to learn Mathematica first on a notebook interface, then use WITM when you need to. But another argument would be that you can learn to use Mathematica more easily on WITM, which may be appropriate in some cases.
- Answer: The server, which will run both the web server (probably Apache) and Mathematica must run UNIX, Linux, or a UNIX-like platform for which a version of Mathematica is available. At the time of writing (July 2006), this includes Mac OS/X, Solaris, Linux, IRIX, AIX, Tru64 and HP-UX. The client can run just about any OS.
-
Answer: It is possible you could. It would require that:
- The web server is configured to serve PHP pages - most are nowadays, or if not can easily be configured to do so.
- The user that has runs the web server (often 'nobody') has access rights to Mathematica. In some cases only specific users can connect. This can be enforced by a license manager.
-
Answer: Although superficially similar, there are a large number of differences
between WITM and webMathematica
- WITM is free for both professional or amateur use. It is copyrighted by Dr. David Kirkby, but is released under the terms of the GNU General Public License.
- webMathematica provides a small subset of Mathematica's functionality although the subset can be configured by the person writing the webMathematica application. WITM is designed to provide as much functionality as possible.
- webMathematica is designed to enable anyone with a suitable configured browser to use a subset of Mathematica. WITM is designed for trusted and licensed users only, and so is not suitable for providing public access to Mathematica.
- webMathematica requires a browser supports Javascript for any graphics based applications, whereas WITM does not.
- webMathematica supports a rather nice LiveGraphics3D graphics, where you can create and manipulate three-dimensional graphics interactively in your web browser. WITM has no support for that feature, which I think would need code licensed from other sources, but I may be wrong on that.
- Visitors to a webMathematica-based site do not need to know how to use Mathematica, but users of WITM will need to know Mathematica.
- webMathematica is designed with security in mind, to prevent users performing unauthorized Mathematica operations, such as filling up the file system, or deleting files. No attempt has been made to make WITM secure, since this conflicts with the overall aim of providing as much as Mathematica functionality as possible.
- webMathematica requires that Tomcat (or similar) is installed and run on a port that is not 80. WITM runs on the standard port 80 since it requires nothing more than the web server.
- WITM requires that the web server support PHP, whereas webMathematica does not, although it requires Tomcat or similar, where WITM does not. (Most web servers are configured for PHP, whereas Tomcat support is far less common.)
-
Answer: No. There are several licensing and security issues that would prevent that.
Even if your Mathematica license allow it, and you trust your users, there
is still the possibility of graphs being shown incorrectly. Two users can both
be creating a graph and each get the wrong version. I hope to address this
issue, but WITM is not designed for allowing a large number of users.
One way around this would be to run multiple copies of Apache under different UIDs on different ports. But this would soon use a lot of resources, so it would not be sensible for a large number of users.
- Answer: No - at least directly.
-
Answer: WITM uses PHP, (which is a server-side
scripting language) to pass Mathematica commands typed into the Text box on
WITM to standard input of Mathematica. Once Mathematica has processed those commands,
it puts the results on its standard output. The PHP code pipes that back to the browser,
so the user sees Mathematica's results.
If the results are graphical in nature, there is not a lot of point in sending back a load of coordinates to the user. Instead the Mathematica function Export is used to create a GIF file. The web browser is configured to show that GIF file if it is present.
- Answer: Not currently, but this is something I will look at adding in the not too distant future. As stated above, WITM works by piping commands on the standard input of the Mathematica kernel and reading the results from the standard output. If public and private keys are set up, it should be possible to pipe the commands to ssh on the webserver, which then pipers that to standard input of the the Mathematica kernel on the remote host, passing the results back to the webserver. That's the theory, but there are a number of potential problems - like where do graphics files get created? It will need a bit of work.
- Answer: No. Mathematica is only started by WITM
when a command is submitted to it, by pressing the 'Evaluate'
button. Mathematica exits when the results have been
computed. So the act of pressing the Evaluate button starts
Mathematica - it does not (and should not) run at other times, unless
someone else is using it either interactively or via a batch file.
It is a function of the web server (typically Apache) to listen for incoming requests. Hence that must be restarted if there is a crash. The web server will only parse WITM's PHP code if it receives such a request.
-
Answer:
It depends on the type of problem. Failures will likely show in one of 4
ways.
- You get a standard HTTP error message from the web server, such:
as
- 401 (Unauthorized)
- 403 (Forbidden)
- 404 (Not Found)
- You only see lots of commands like this:
<?php // WITM is a web-based front end for Mathematica. Written by Dr. David // Kirkby, under the GNU General Public License, version 2 // Copyright (C) 2006 Dr. David Kirkby // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // The license is written in full in the file 'licensing.php' $WITMversion="0.62"; $WITMdate="18/6/06"; $WITMlongdate="18th June 2006"; // Give the path to Mathematica. $math="/usr/local/bin/math -batchinput -batchoutput";
- Build PHP, giving the configure script the path to the Apache file apsx.
- Add some PHP directives to the Apache configuration file httpd.conf
- You see the WITM page, but see an error message like this:
WARNING: It would appear that WITM has not connected to Mathematica - this will always happen on http://witm.sourceforge.net/ since Mathematica is not installed on Sourceforge. But if this message appears when you expect WITM to connect to Mathematica, then there is a problem.
In this case ensure Mathematica is installed, the permissions allow user 'nobody' to run it, there are licenses avialable and that the path to Mathematica in witm.php is correct. - You can work out text based calculations, such as
10! or 12+3
but you can't produce graphical output, so commands like
Plot[x,{x,0,10}]
don't behave as expected. This indicates a problem with Mathematica being unable to connect to a DISPLAY. See the installation instructions for how to solve this.
- You get a standard HTTP error message from the web server, such:
as
- Answer: Drop me an email to discuss it.
- Answer: As you should be aware, there are likely to be license and security issues with that, so don't leave it like that! Access control to the WITM front page is not controlled by WITM, but by the web server. You need to configure your web server to password protect the page - it is not something WITM does.
- Answer: WITM does not provide the security - it is up to your web server to do that. If you want to encrypt the data to stop passwords being sniffed, then you will need to use Secure Socket Layer, or SSL. Configuring SSL is beyond the scope of this FAQ.