CGI Support Notes
WebX includes support for CGI processing. To enable CGI processing:
1. Creates a directory that will contain your CGI executables. Typically, this will be the "/scripts" directory that is in the same directory as "/html". You can put this directory anywhere you please, since web pages will never explicitly refer to the physical path. Creating this directory is not a requirement but will help keep your site organized, as well as, enhancing security since you can set the permissions of this directory independent of other directories.
2. The directory where the CGI executables are kept must have WRITE permissions. This is important under Windows NT and Windows 2000 where the application hosting WebX may not be running under an account with the required permissions to write to this directory.
3. Place the CGI executable in the /scripts directory.
4. In your code, set .CGIEnable = TRUE and CGIDirectory = strPath, where strPath is the physical path to the directory containing the CGI executables.
NOTE: In order to minimize potential security issues, we recommend that the /scripts directory should not be placed in the /html directory. Locating the /scripts in the same directory where you have /html will avoid this issue.
When a CGI script is called, WebX will write a file to CGIDirectory containing all the CGI Environment Variables. It will then call the executable, passing the name of the CGI Environment Variables file. The file is in Windows INI format and has the connection number in the name of the file. After the CGI script is executed, the file is deleted.
More information may be found on CGI processing in the sample applications and at the following web sites:
http://hoohoo.ncsa.uiuc.edu/cgi/ (CGI Interface at NCSA)
http://ds.dial.pipex.com/bulcockc/cpp_dev.htm (Excellent C++ CGI ISAPI Examples)
Microsoft MSDN has several informative documents regarding CGI processing informative documents regarding CGI processing. Search for "server-side includes".