Internet Programming "lab 3"


Due:  Sunday April 18th at 11:59pm
Note that we do not have class the following day due to a holiday so I'll give the follow on project the Monday before.

summary : You are going to create a web based submission system in php.


Details:

 The submit system should have functionality similar to the existing  java based system. You should implement at least the following functionality.

Implementation technology.

Well we've got localhost connectivity, which is better than nothing. I'm continuing to work with the IT people and it should soon be available from other machines, but lets start with what we have.


We will be using nanoweb, a web server built in php to serve php. This will give us a couple of advantages over apache - first Apache has configuration problems and I've been able to make nanoweb work for us. Two, nanoweb takes far fewer resources, which will be important when we are all working at the same time and competing with the Information Retrieval classes for compute resources.

You will start the server with

/usr/sbin/nanoweb.php --config=<your config file>

You will find that you need a copy of the nanoweb config file. You can grab a copy of mine from my home directory. From the folder you plan to work on the project from you can do the following

cp ~jsantore/nanoweb.conf .

This file has been setup for me to run so you will need to edit it for your own use. Please open it in your favorate editor and search for all occurances of #IP_CLASS_EDIT. I've put that just above each of the lines you will need to edit with a further comment about how to edit them.

Once you have edited the file you'll need to keep track of the values you chose for ListenPort (the port your webserver will be run on) and DocumentRoot (the folder the web server will look in first for documents to serve.)

Now create a file called index.php in the DocumentRoot folder. Make the file executable. If you don't the php handler won't run it, it will give you nothing. To test to make sure your setup is working start with the following test contents.

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Now save your file and run nanoweb.

Run konqueror (from csdev02 for now till we get the problems ironed out) and type:

http://csdev02.bridgew.edu:<your ListenPort>/index.php
(for example mine is http://csdev02.bridgew.edu:10004/index.php)
into the address bar and go there. If all is working, you should see multiple pages of php configuration information. That is your queue that you are all set to start writing your project.

Writeup

You will need to include a writeup of your project with your submission of the project. The writeup should include at least:



submit using the current java based submit setup

cd ~jsantore/onlineSubmit

then use this line to run the submit program:
./submit.sh &

This will pop up a window allowing you to choose your class (and possibly section) and the file to submit. When you have done so press submit and in a few seconds (longer if you submit a really large file) you will see a dialog pop up telling you your submission was sucessful.
.