WITM Frequently Asked Questions (FAQ) The latest version of the FAQ will always be found at http://witm.sourceforge.net/ THIS TEXT FILE IS NOT KEPT VERY UP TO DATE. 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. Question: Is WITM easy to install? * 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. Question: The notebook interface of Mathematica is quite hard to use, with the cells. Would using the much simpler web-based interface of WITM be a sensible way to learn Mathematica? * 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. Question: What operating systems are supported? * 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. Question: I don't have administrative (root) access on the server which runs Mathematica and Apache. Would it be possible for me to install WITM and access Mathematica, without bothering my system admin? * Answer: It is possible you could. It would require that: o The web server is configured to serve PHP pages - most are nowadays, or if not can easily be configured to do so. o 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. o However, there are numerous license and security issues that would arise, which means you would be ill advised to do this. Question: What are the differences between WITM and webMathematica? * Answer: Although superficially similar, there are a large number of differences between WITM and webMathematica o 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. o 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. o 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. o webMathematica requires a browser supports Javascript for any graphics based applications, whereas WITM does not. o 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. o Visitors to a webMathematica-based site do not need to know how to use Mathematica, but users of WITM will need to know Mathematica. o 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. o 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. o 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.) Question: Can WITM be used to allow a large number of people to use Mathematica? * 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. Question: Does WITM use Mathlink, which is the connectivity technology that allows a Mathematica front end to communicate with a kernel. * Answer: No - at least directly. Question: Since it does not use Mathlink how does WITM work? * 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. Question: Does WITM work if the web server is on a different machine to the Mathematica kernel? * 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. Question: Do I need to ensure that Mathematica restarts at boot time, or if it crashes for whatever reason? * 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. Question: I've installed WITM, but it does not work. What now? * Answer: It depends on the type of problem. Failures will likely show in one of 4 ways. 1. You get a standard HTTP error message from the web server, such: as o 401 (Unauthorized) o 403 (Forbidden) o 404 (Not Found) 2. You only see lots of commands like this: