CGI / CGI-BIN Execution

1. What is the extension of CGI file?

The extension of CGI files are .cgi or .pl .

2. What is the CGI path ?

The path is /usr/bin/perl, you have to add #!/usr/bin/perl to the top of every cgi programs.

3. What is the absolute path for my cgi-bin folder ?

/home/USERNAME/public_html/cgi-bin

4. What is the path of Sendmail ?

/usr/sbin/sendmail

5. Why there is a error on my CGI programs ?

  • You have to use ASCII code for the upload of CGI programs.
  • All CGI program have to located inside folder cgi-bin.
  • CGI files should use 755 as the access right/file permission.
  • All folder under folder cgi-bin should also have 755 access right. If the file is a data file only, you can set it as 777.
  • Folder cgi-bin have an access right of 755. It cannot be changed.
  • If you still have error in excuting CGI programs or have message "Internal Server Error", it may represent there is a error on your programs. Please check your program in detail.
  • For more information, please email to support@keynet.com.hk .

6. How to view CGI files?

To browser cgi files on the browser such as Internet Explore / Netscape, you have to enter the following url: http://www.abc.com/cgi-bin/test.cgi

7. Why there is a message " Internal Server Error" for my html and image files within cgi-bin ?

All files in cgi-bin are treated as CGI program, Thus, other type of file can not be excuted in this case.