Sonic.net

Solutions

Resources

Search

Google

Company

Sonic.net, Inc.
2260 Apollo Way
Santa Rosa, CA 95407

(707) 522-1000 Voice
(707) 547-2199 Fax
(707) 547-3400 Help

support@sonic.net

Partners

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

CGI FAQ List

Topics

  1. What is a CGI?
  2. Commonly used languages
    1. Perl
    2. PHP
    3. Python
    4. C/C++
  3. Unsupported development mechanisms
  4. Location of commonly used utilities
    1. Date
    2. Sendmail
    3. Convert
  5. What does Permission Denied mean?
  6. What does Malformed Header mean?
  7. Where can I find the error logs for my CGI?
  8. Where can CGIs be run from?
  9. What will the URI for my CGI be?
  10. CGI-bin and web-hosted domains
  11. How do I get CGI help?

Answers List

  1. What is a CGI?

    The Common Gateway Interface (CGI) is a mechanism for sending information from an end-user's web browser to a program on the web server. CGI also allows for the program's output going back to the end-user's web browser for display.

    Common usage for the term "CGI" is in reference to a program that takes input from a web browser and does something with it. Common uses for CGIs include web guestbooks, search engines, and shopping cart software.

  2. Commonly Used Languages

    There are a number of languages that can be used to write a CGI. The following are some of the more popular languages that our web servers support.

    1. Perl

      Perl is a widespread scripting language that has rather firmly entrenched itself into the internet. Our web servers run Perl 5.005_02 (view full info). The Perl interpreter itself is located at /usr/local/bin/perl

    2. PHP

      PHP: Hypertext Preprocessor (PHP) is used as an alternative to Microsoft's Active Server Pages (ASP) technology. Our webservers use PHP version 4 (view full info) with the interpreter located at /usr/bin/php

      PHP 5 is available (view full info), though it is not used as the default interpreter. Please see our PHP 5 document for more information.

    3. Python

      Python is a strongly object-oriented programming language that is becoming increasingly popular with web programmers. Our webservers use Python version 2.3.4 with the interpreter located at /usr/bin/python

    4. C/C++

      One of the most broadly-used programming languages of all time, programs written in C or C++ are most often compiled into self-sufficient executable files.

  3. Unsupported development mechanisms

    The Sonic.net webservers do not support CGI-style programs written in the following formats:

    • Microsoft Active Server Pages (ASP)
    • Java Server Page (JSP)
    • Cold Fusion
  4. Location of commonly used utilities

    1. Date is located at /usr/bin/date
    2. Sendmail is located at /usr/sbin/sendmail
    3. Convert is located at /usr/bin/convert
  5. What does Permission Denied mean?

    Permission Denied is an error that is triggered when a program tries to do something it is not allowed to, or when a web browser requests a file that it is not allowed to use

    If you are getting this message on a page or script that you own, then you probably need to change the permissions on that file. Just login to your shell account and do the following:

    • type: cd /path/to/file/
    • then type: chmod 755 filename
    • then: exit to leave the shell.

    Most Mac and Windows FTP programs will allow you to change file modes (permissions) as well, so shell access is not strictly required to modify permissions.

    Advanced information on Modes.

  6. What does Malformed Header mean?

    A malformed header is a general error that means that your CGI did not execute properly. This can be caused by an improper type declaration in your program's output, or even by a syntax error in the program itself.

    Missing semicolons and incorrectly uploaded files are common culprits. Double-check the source code for errors and try again.

  7. Where can I find the error logs for my CGI?

    The error logs for each of our web servers are located at /var/log/custweb/error.log. Inspecting the error logs can be very helpful in tracking down the causes of CGI problems in general.

  8. Where can CGIs be run from?

    /home/WWW_pages/username/

    This is your default web directory, where your HTML and image files are likely to be located.

  9. What will the URI for my CGI be?

    Files in your default web directory will be accessible on the web at http://username.users.sonic.net/filename

  10. CGI-bin and web-hosted domains

    If you have a web-hosted domain name, any requests for the "cgi-bin" or "cgi" subdirectory will be directed to content in /usr/local/lib/httpd/cgi-bin/ instead of your normal web content. This is an artifact of an older web cluster configuration left in-place to support legacy web sites.

  11. How do I get CGI help?

    You can start by posting your questions to the sonic.help.cgi newsgroup.


Visit this site
Home | Sales | About Us | Jobs | Member Tools | Support | Web Mail | Find Dialups | Live Help | Contact Us