Ns register cgi

From AOLserver Wiki
Revision as of 00:42, 4 October 2009 by Akhassin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NAME

ns_register_cgi - Register a CGI map for a method/URL combination

SYNOPSIS

ns_register_cgi ?-noinherit? method URL CGIscript

DESCRIPTION

In the past, to map a URL to be handled by the nscgi module, you had to make the change in your config .tcl and restart AOLserver. This command is new to the AOLserver 4.5.1 version of nscgi and allows you to create mappings after startup.
Example:
ns_register_cgi POST /cgi-bin/* d:/scripts/cgi.exe
Just like with registered ADP pages or procedures, the CGI script will be invoked irregardless of the original requested target existing or not.

NOTES

From Dossy's Blog: Caveat: It is currently possible to load the nscgi module multiple times in the same AOLserver process, for each virtual server. It is also possible to load it multiple times for the same virtual server. I'm not sure why anyone would do that, but it's possible. In that circumstance, the behavior of ns_register_cgi is undefined–as in, I haven't tested it. It may or may not work correctly. If you run such a configuration, where nscgi is loaded multiple times in the same virtual server, please test this carefully and share your findings. Thanks.