This project must be done individually. No copying is permitted. The goal of this project is to develop a photo-album application on the cloud. More specifically, you will use the Amazon Simple Storage Service (Amazon S3) to create a photo album, in which you can upload, delete, and browse photographs.
For this project, you will use the Omega web server. As in Project 2, login to omega.uta.edu and look at your path using the unix command pwd. For example, if your username is xyz1234, you will see:
/home/x/xy/xyz1234In the following, replace the path /home/x/xy/xyz1234 with your own path. Then, you do the following on omega:
cd public_html wget http://lambda.uta.edu/cse5335/project4.tgz tar xfz project4.tgz cd project4Then edit the file .htaccess (note: it starts with a dot) inside the project4 directory and change the line
AuthUserFile /home/x/xy/xyz1234/public_html/project4/.htpasswdto point to your own path. Then do:
htpasswd .htpasswd xyz1234(use your username instead of xyz1234). It will ask you for a password twice. This is the password you use when you run your PHP scripts on a browser. It already contains a password for the GTA; so the GTA can run the script of any student but you can only run your own script. For this project, you should put your PHP files in the project4 directory only. You can test your setup on your web browser by using the URL address:
http://omega.uta.edu/~xyz1234/project4/album.php(use your username instead of xyz1234). Note that if a script doesn't require GET/POST parameters, then you can test it by running it on omega using php. For example, php album.php
Please look a Project 2 for links to PHP tutorials. There are many ways to interface to Amazon Web Services (AWS) from PHP: You can use the REST protocol directly, but this is very hard because every interaction must calculate a signature from the HTTP content to sign the HTTP request. There are high-level interfaces, such as Amazon's AWS SDK PHP and ColdFusion, but I found them hard to program. So, for this project you will use the Services_Amazon_S3 PHP package, which is very easy to use. This package is already installed on omega. Look at the project4/album.php to see how to import the package. Here is the documentation:
$o = $bucket->getObject("xyz1234/a.txt"); $o->data = file_get_contents("a.txt"); $o->save();
You will develop a trivial photo-album application on Amazon S3. Your task is to modify your album.php script in your public_html/project4 directory on Omega to support the following operations:
Important: On top of your album.php file, write the URL on Omega to use to run your program (eg. http://omega.uta.edu/~xyz1234/project4/album.php). Use the form below to submit your album.php file. You may submit your file as many times as you like, but only the most recently submitted file will be retained and evaluated.
Last modified: 03/04/11 by Leonidas Fegaras