User Tools

Site Tools


techstaff:how_to_use_cgi

This is an old revision of the document!


CGI Programming

The purpose of the CGI service is to allow CS users to learn CGI programming and make small, dynamic sites in their course work.

These mechanisms are valid for any CS computer. linux.cs.uchicago.edu is recommended for anyone that understands (SSH), otherwise any machine in our lab will do.

To use our CGI server, you must first be registered in a class that requires it. Your instructor will let techstaff know of this requirement ahead of time and you will automatically get access.

Directories

All files related to the course will be hosted out of your home directory in a folder called ~/cs. A folder for the course you are taking will automatically be created in the ~/cs directory. For example:~/cs/cs10100.

File Permissions

Techstaff does set some extended permissions on these directories so they should not be moved. If you do end up moving or modifying them, it will result in you not being able to access your site.

You should not have to worry about modifying any permissions below the ~/cs directory.

Example

PHP is a language designed explicitly for web programming. A single line in the file html/hello.php will do.

In this example please keep in mind that <hostname> will be provided by your instructor.

<?php print("Hello World!\n"); ?>

You can run your php file from the command line:

php hello.php

Or from your browser:

http://<hostname>.cs.uchicago.edu/~user/hello.php

For additional assistance with this service, email techstaff@cs.uchicago.edu.

/var/lib/dokuwiki/data/attic/techstaff/how_to_use_cgi.1632345417.txt.gz · Last modified: 2021/09/22 16:16 by ctopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki