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.
- There needs to be an authentication system
- the user needs a way to register
- created the users submit directory when they register.
- once registered the user needs to be able to log in
- There should be a way for the faculty member to change which
classes are represented each semester without touching any code
- There should be a way for the user to select a file to submit
- the directory structure for submitted files should have the
following form
- <submit master
dir>/<class>/<username>/<files>
- there should be a way for the student/user to view the file
names, sizes and dates of the files that they submit.
- of course there should be no way to see anyone elses files.
- have a way to display the contents of a zip file in the view
submissions view
- include a time stamp in the name files submitted (eg
11-1-08myfile.zip) but do not display these timestamps when showing the
students what they submitted.( so the above should look to the student
like myfile.zip)
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:
- Your name!!
- How do I use your program?
- and how should I set up the classes
- how does a user select the classes
- hows does the student register?
- how does the student view his/her files?
- how do I configure the program
- what port should I connect to
- where do I place your files to run them (in relation to the web
root) What file should I use as the entry point?
- How did you write your program?
- what design decisions did you make?
- how well did it work?
- what false starts did you have?
- How well did your program work?
- is there any bugs that I will encounter?
- does your program do everything? is it easy to use?
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.
.