SDSU CS 596: Client-Server Programming
Spring Semester, 1997
Doc 20, CGI on Rohan

To Lecture Notes Index
San Diego State University -- This page last updated Apr 3, 1997
----------

Contents of Doc 20, CGI on Rohan


CGI On Rohan slide # 1
...Step 1 slide # 1
...Step 2 slide # 1
...Step 2 Optional slide # 2
...Step 3 World Access slide # 3
...Step 4 Runing Programs slide # 4
...Some Errors slide # 5

Doc 20, CGI on Rohan Slide # 1

CGI On Rohan


See http://www-rohan.sdsu.edu/hpguide.html for the offical word

Step 1


You need a named account on Rohan

Step 2

Request Permission for CGI bin access

If you already have registered for a Web page on rohan you can go to step 3

To register send Email to webmaster@rohan.sdsu.edu.

With the subject line Registration, the body of the Email message must have:

Your full name
Your account name on ROHAN
Tell them you are a student

If you doing this just for cgi bin access for this class, you should indicate that in the email.

You will receive email when your access has been granted


Doc 20, CGI on Rohan Slide # 2

Step 2 Optional

Creating a Real Home page

If you are going to have a real Home page then you should:

All personal home pages must contain:


The Disclaimer button can be included via adding the following html on your page:

<a href="/cgi-bin/disclaimer">
<img border=0 src="/graphics/disbut.gif" ALT="Disclaimer"></a>

Doc 20, CGI on Rohan Slide # 3

Step 3 World Access


The world (other) needs read access to your home directory

This is done using chmod command

chmod a+rx ~

or

chmod 711 ~

All html files need to be readable by the world

Use:

chmod a+r filename
All cgi programs must:


The latter can be done via:

chmod a+rx filename.cgi

Doc 20, CGI on Rohan Slide # 4

Step 4 Runing Programs


Assume that the following is in the file hellowWorld.cgi in your home directory and all permissions are correct:

#!/bin/sh
echo Content-type: text/html
echo
echo "<CENTER><H1>Hello World</H1></CENTER>"

Access the URL:

http://www-rohan.sdsu.edu/home/yourAccountName/hellowWorld.cgi
from a web browser will display the page:


Hello World
Doc 20, CGI on Rohan Slide # 5

Some Errors

Access Permissions not Correct

Forbidden

You don't have permission to access /faculty/whitney/helloWorld.cgi on this server.


Incorrect Permission on directory cgi-bin

File Not found

The requested URL /faculty/whitney/cgi-bin/test.cgi was not found on this server.


All cgi program must be in home directory

Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, nash@rohan and inform them of the time the error occurred, and anything you might have done that may have caused the error.
----------