vqServer CGI scripts


CGI scripts are a common way of adding extra functions and capabilities to web servers. CGI scripts are programs which run on a web server computer in response to requests from web browsers. CGI scripts can be written in any language supported by your computer (although they are most often written in PERL).

vqServer implements version 1.1 of the CGI interface.

Although vqServer handles CGI script calls efficiently, Java servlets are an inherently more efficient way of extending a server's capabilities. This is explained in detail on the JavaSoft web site. vqSoft therefore recommends using Java servlets instead of CGI scripts if possible.

vqServer cannot invoke some (16-bit) CGI scripts when running under Sun's Java Platform 2 (JDK or JRE 1.2) on Windows. This appears to be a limitation of this Java Virtual Machine. vqSoft suggests using Sun's JRE version 1.1.8 or Microsoft's JVM instead.

vqServer
FAQs
Register (free!)
Support

Contents

Java servlets
File types

Parameters
PATH_INFO
Security

Calling CGI scripts

CGI scripts are invoked by typing the appropriate alias in the Address box of a web browser or by clicking on a link on a web page (which sends an alias to the web server). The action associated with the corresponding alias must be Run CGI scriptvqServer expects the real name corresponding to the alias to match cgidir/progname.ext (see the Aliases page). progname.ext must either be a file which can be executed directly by your computer (for example, on Windows computers, progname must be a .exe, .com or .bat file) or you must specify a CGI script interpreter from the file types page of the control centre for files of type ext.

CGI scripts and alias parameters

Parameters associated with an alias are passed to CGI scripts as environment variables.

PATH_INFO

This is information in a uniform resource locator (URI) which follows the part of the URI which refers to the CGI script. vqServer always correctly separates the two parts of the URI but this process is much more efficient if the script is named explicitly in its own alias. So if your site relies on CGI scripts which require PATH_INFO create an alias specifically for each such script.

Security considerations

vqServer doesn't impose any restrictions whatsoever on CGI script activity. For example CGI scripts can read, write and delete any file on your computer. So make sure that any CGI scripts you deploy on your web site come from a reputable source or are thoroughly debugged.


vqServer version 1.9. Copyright © 1997-2000 Steve Shering and vqSoft. Last updated 13 September 1999.

vqServer
Contents
CGI scripts

Java servlets
File types