Body
Purpose
This article has instructions to set up CGI for your personal webpages. We allow CGI access under personal webpages with the following restrictions:
- Scripts are limited to 9 seconds of CPU time.
- The Office of Information Technology cannot assist with specific CGI programming issues or instructions.
Setting up CGI
- Connect to Giant and navigate to ~/public_html.
- Type mkdir cgi-bin. This creates a directory for your CGI scripts.
- Type chmod 755 cgi-bin. This sets correct permissions for the directory.
- Type cd cgi-bin. This moves to the new CGI script directory.
- Write your script.
- If you want to use PHP, then it should be embedded in the html file with:
<?php
..
?>
- Your scripts must be executable. chmod u+x scriptname.php.
- The first line of your PHP script must be #!/usr/local/bin/php.
- If using PERL, your script must begin with #!/usr/local/bin/perl.
- Execute your script at https://personal.utdallas.edu/~netid/cgi-bin/scriptname.