CGI on Gibson
- I have created an entry in two configuration files on Gibson (access.conf & srm.conf) that allows cgi files to be recognized and executed.
- This requires that you put all cgi files in your cgi-bin directory under public_html (make sure to chmod 755 on cgi-bin)
- If you are using perl, the first line of your program must be #!/usr/bin/perl
- This will envoke the perl interpreter which will interpret and execute your program
- Don't forget to chmod 755 on all of your perl programs
- Before you test your programs over the Internet, you can also run your perl program locally on Gibson by typing ./filename (e.g. ./hello.pl where hello.pl would be the name of a perl program)
- Does your perl program report that the file or directory is missing when you type ./hello.pl but when you type perl hello.pl it works fine.
If you create your perl program on your PC and save it there, you might have this problem. [this will happens if you ftp your file over to a linux(unix) system using binary mode]
To fix it,
- make sure that #!/usr/bin/perl is the first line
- make sure the second line is blank
- if that still doesn't work, use pico on gibson to add another blank line and then remove it. [UNIX and DOS terminate lines differently.]
- Let me know if you have any trouble
Examples
Click here to return to Wayne's World's homepage:
written by Wayne Summers summers_wayne@ColumbusState.edu