|
|
|
CGI Scripts
-
You must create a directory in your public_html directory called "cgi-bin" and set its permissions with chmod to 755.
Example:
eclipse:[/home2/jdoe] cd public_html
eclipse:[/home2/jdoe/public_html] mkdir cgi-bin
eclipse:[/home2/jdoe/public_html] chmod 755 cgi-bin
Then, put your CGI scripts in that directory, and assign each script the permissions to 755.
-
If your script is a Perl script, then the first line in your Perl script should read:
#!/usr/local/bin/perl -
To call your cgi-bin script from HTML, you must use CGIWRAP. The syntax of CGIWRAP is:
http://www.qis.net/cgi-bin/cgiwrap/username/script
So, if your username is "jdoe" (as in the example above) and you have a CGI called "myscript", you would call your script like this:
http://www.qis.net/cgi-bin/cgiwrap/jdoe/myscript
One nice feature of CGIWRAP is the ability to easily debug your script. CGIWRAP can output environment variables and error messages if your script is not working correctly. To put CGIWRAP into debug mode, just add a "d" to the end of the CGIWRAP filename, like so:
http://www.qis.net/cgi-bin/cgiwrapd/jdoe/myscript
All questions regarding CGI-BIN and CGIWRAP should be directed to help@qis.net
|
|