Running CGI scripts

It is possible to execute external programs and have their output transmitted to the remote client (and also have input from the clients sent to the external programs) by virtue of using the Common Gateway Interface (CGI) protocol.

By default Phttpd will start an external program using the CGI protocol if the file is executable and either stored in the /cgi-bin/ directory or have a suffix of .cgi or .nph.

Such executable programs stored in a users own public directory will be executed as that user's uid and gid.