Dave (from the UK) science forum addict
Joined: 12 Jan 2006
Posts: 76
|
Posted: Sun May 21, 2006 5:32 pm Post subject:
'witm' - Web Interface To Mathematica.
|
|
|
I've made some quite significant changes to the php code I mentioned a
few days back.
It can now run most Mathematica commands, as well as display 2D and 3D
graphics. I suspect you can produce sound too, but I have not tried.
There is a *non-functioning* demo at
http://www.althorne.org/witm/witm.php
A 3D graph was created over the web and is placed at
http://www.althorne.org/witm/graph.pdf
In order to run this, you will need a
1) UNIX or Linux computer.
2) Web server (almost certainly apache)
3) Web server configured for PHP.
4) Copy of Mathematica on the web server.
Feel free to download the php code at
http://www.althorne.org/witm/witm.txt
You will then need to save this as witm.php, not as .txt as on the web
server. The name is important - if you want to use anything other than
witm.php you will have to hack this line.
<Form action="witm.php" method="post" >
You would be strongly advised to password protect this, as it is
possible for a user to read/write to any file which the user of the web
server (typically 'nobody') can do. Also, Wolfram Research might object
if you made the full Mathematica program publically accesable.
You might need to hack a couple of lines - particularly this one
$tailprog="/bin/tail +3 | head -1";
which gets the results from the program, and misses any irrelevant junk
like the version of Mathematica. If it is not right, you will not see
the result.
Also this, which is the path to 'math'
$mathprog="/usr/local/bin/math -batchinput -batchoutput";
You might want to change these too:
$maxram=1000000000; // Maximum RAM in bytes
$maxtime=10; // Maximum time in seconds
which set how long the kernel can run the computation, and how much
memory it can use.
I'd be interested if anyone tries to get it working.
There are < 100 lines of php, including comments, so it should not be
hard to see how it works.
If there is any interst, I might stick it on Soureforce. Shame I can't
do a live demo, but it is just not practical for security and legal
reasons.
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. |
|