docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 4.0System Developer ManualProgramming Languages
Copyright © 2006, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

Pike
Pike Script
Pike Processing Instruction
Java
Perl
Using In-Line Perl Code
Running Perl Scripts
Supported mod_perl API Methods
CGI
What is a CGI Script?
CGI Environment Variables
CGI I/O Via Standard Streams
PHP
Python

PHP

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