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.