post your comment   print   send to a friend
Rate:  63% | Views: 8210
Question categories:  CGI scripts

Using CGI Scripts (Perl, Unix shell, etc.)

The most common way to create dynamic content is to use CGI (Common Gateway Interface), which is the web server that executes a program generating an HTML page as output. There are two methods used to pass information (such as the content of the input fields in a form) to the program: GET and POST. The information is encoded and needs to be decoded. There are common libraries for Perl, C, etc. for handling CGI input.

In your web page you need to reference the CGI either as link or as ACTION in the form tag if the CGI is supposed to handle a form. Example:

<FORM METHOD="POST"
ACTION="http://www.yourdomain.com/cgi-bin/file.pl">

On NT web servers, script file extensions are associated with the interpreter for the language (e.g. - .pl files are associated with Perl and will be directly executed).

On Unix web servers, the scripts need to begin with #! and the interpreter location (e.g. Perl scripts must start with the line #!/usr/local/bin/perl ). Also, the scripts must have executable permissions for the web server - after you upload the scripts, FTP to your web server with your username and password, and change the permissions to 755. Some FTP programs support changing permissions with a function named “chmod” or simply “change permissions.”

Customer Feedback
Rate:  63% | Views: 8210 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Dedicated Servers | Web Page Design    Back to serch results
Browse the Base
Knowledge Base
Web Design
  Do It Yourself
    CGI scripts
Messages
 

Gain reliability through Load Balancing!

For dedicated servers only.  Build a distributed and more reliable system of multiple smaller servers instead of one superserver. The load balancer makes multiple servers look and act as one super server.  Click below to learn more!
More info ...

Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. What is CGI?
 
Related Articles
 

How to Select a Web Site Hosting Company.

Cheap Web Hosting Unix or NT.

A Simple Guide To Linux Web Hosting.

Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest