docs.roxen.comBack to normal mode
DocsRoxenWebServer 3.4System Developer ManualProgramming Languages
Copyright  2006, Roxen Internet Software
Suggestions, comments & compliments


The PHP language differs a bit from other script languages in the sense that it is designed mainly for use inside web pages. This makes a typical PHP program take the form of an HTML/RXML/XML page with <?php ... ?> segments inside it. Everything outside of these segments is treated as an instruction to output itself literally.

While there is an experimental module for embedded PHP support available, the officially supported mode of running PHP with Roxen is by the traditionally method of running it as a CGI scripts. This can be accomplished using these steps:

  1. Compile PHP as a CGI application. Consult the PHP documentation for detailed information on how this is done. You should get a binary file called php as a result of this operation.

  2. Add the modules CGI Scripting Support, Path Info Support, and Redirect Module to your Roxen server configuration.

  3. Copy the php binary to the /cgi-bin/ directory of your site.

  4. Add a redirect pattern for handling files ending with .php:
    /(.*)\.php(.*)$     /cgi-bin/php/$1.php$2