You are not logged in Log in Join
You are here: Home » Members » hewei » PHParser/PHPGateway » PHParser-1.1.2 » PHParser 1.1.2 Installation Instructions » View Document

Log in
Name

Password

 

PHParser 1.1.2 Installation Instructions

Requirements

  • PHP 4.0 and up compiled as CGI. Neither Apache module nor the CLI version coming with PHP 4.3.0 will work. You probably will compile PHP from the source on Unix platforms.The RedHat PHP RPM package doesn't contain PHP CGI. If you are trying to find a package containing the CGI executable, you might be interested in IED's RPM contribution . For Windows, you can download and use any of the Windows Binaries.
  • Your PHP CGI must be compiled with --enable-force-cgi-redirect.
  • In your PHP configuration file that affect PHP CGI (php-cgi.ini or php.cgi if the former doesn't exist), the doc_root directive MUST be empty.
  • You might need to modify the PHPath line in PHParser.py to specify the full path of the PHP CGI executable. For example, the default value for Unix /var/www/cgi-bin/php is not likely where your PHP CGI is located unless you use IED's PHP RPM package.
  • Alternatively, you can create a symbol link /var/www/cgi-bin/php pointing to where your PHP CGI's really located to avoid modifying the product source. Thanks to Michael W. Dietrich, who discovered this.
  • If you want to turn HTTP authentication support on, you need to modify PHParser.py to set EXPOSE_HTTP_AHTHORIZATION=1. But doing this may tell the PHP script your ZMI username and password. Don't do it if you don't trust the script to be parsed or gatewayed.

Installation

Unix:

        cd ZOPE_HOME/lib/python/Products

        tar -zxvf /path/to/downloaded/PHParser-x.y.z.tar.gz

        (Optinoal modification to the source files)

        Restart Zope

Windows:

        unzip PHParser-x.y.z.tar.gz to ZOPE_HOME\lib\python\Products

        (Optinoal modification to the source files)

        Restart Zope

User Modifitable Options:

PHParser.py:

      * PHPath         Where your PHP CGI program is located. Default is "c:\\php\\php.exe" for Win32
                       and "/var/www/cgi-bin/php" for Unix.

      * ENVPath        Where your 'env' program is located. Default is 'env'. (Unix only)

      * EXPOSE_HTTP_AUTHORIZATION   If the PHP script to be parsed depends on HTTP authentication
                                    information, you need to change it to '1'. Default is '0'.

PHPGateway.py:

      * DEFAULTPAGES   A list of default pages to search if the request truns out to be a directory. 
                       Default is
                       ['index.html', 'index.htm', 'default.htm', 'index.php', 'index.php3']

      * PHPEXT         A list of file extensions that are to be parsed as PHP. Other files are served as
                       static contents. Defalult is ['.php', '.php3']