Oracle iPlanet Web Server 7.0.9 Administrator's Guide

ProcedureTo Run FastCGI Enabled PHP Application

  1. Run FastCGI enabled PHP.


    $ php -b <hostname>:<port> &

    For example:


    $ php -b localhost:4321 &

    Note –

    You can check whether or not the PHP you are using is FastCGI-enabled by running the command:


    $ php -v

    PHP 5.2.5 (cgi-fcgi) (built: May  8 2008 12:50:19)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    In the output, look for cgi-fcgi to confirm.


  2. Configure Web Server using CLI.

    For example, a Web Server instance named test is created.

  3. Using the CLI, execute the following command:


    wadm> create-fastcgi-handler --config=test --vs=test
     --uri-pattern=/php/* --role=responder --bind-path="localhost:4321"
    wadm> deploy-config test

    A FastCGI handler with the role as Responder is created.

  4. Restart your instance.


    wadm> restart-instance --config=test localhost

    After completing the configuration, you can check if the requests from Web Server are being forwarded to the remote PHP engine.

    1. Place the below sample PHP script in the php subdirectory of your instance docroot, that is, <instance-dir>/docs_directory


      info.php:
      <?php
      phpinfo();
      ?>
    2. Access the remote PHP engine URL: http://localhost:<webserverport>/php/info.php to verify the status of your request.