KB04062901 Integrate Mailtraq with PHPBuild 1670 (and above) includes support for CGI through the web server.
Most users who have asked about CGI are particularly interested in using it as a gateway to Perl and PHP, so I will describe the simple steps necessary to integrate Mailtraq with PHP.
As an example, I'll explain how to install phpbb (a good quality open source discussion forum) in Mailtraq.
1) Download the latest release of PHP (www.php.net)
a) It is not necessary to run any installation scripts, just unzip it to a directory. For this example, install to c:\php\
2) Download the latest release of phpbb (www.phpbb.com)
a) Again, it is not necessary to run any installation scripts, just unzip to a directory. For this example, install to c:\phpbb\
b) You will need to install a suitable database back-end. You can use mysql (www.mysql.org) if you don't have a database installed.
3) In the Mailtraq Console, go to Options | Services and ensure that an HTTP Server is installed on port 80 (or another port if you wish)
4) Go to Options | Web Sites... and click on New Site.
5) Describe the web site as "phpbb", and associate it with your chosen port
6) Go to the Application tab and select "Standard Web Site Path" at "c:\phpbb\"
7) Go to the Documents tab and add "index.php" to the default documents text area on a new line.
8) Go to the Scripts tab and click "Add"
a) Set the mask to "*.php" b) Select CGI c) Set the CGI application to c:\php\php.exe (if you are using PHP5, then use c:\php\php-cgi.exe instead)
9) Close all the dialogues, and try browsing to http://127.0.0.1, then go through the configuration process for phpbb .
Another use for CGI is to directly execute CGI applications (rather than as a script interpreter). To do this, simply add a scripting mask associating "*.exe" with the command line below
"%s"
(the quote marks are necessary). It is possible to browse "through" CGI applications, for example
http://127.0.0.1/cgi.exe/path/file
in which case the cgi.exe can obtain the "/path/file" part from the PATH_INFO environment variable (as per CGI/1.1). |