Personal tools
Document Actions


Bridging the gap between Zope and PHP world!


PHParser/PHPGateway aims to combine Zope and PHP together. It provides you a possibility to run PHP scripts under Zope and Plone.

PHParser is a DTML-Document-like object. Its content when being published is first rendered by the DTML engine and then passed to PHP CGI. The result from PHP CGI will be finally displayed.

PHPGateway is a Folder-like object. When its docroot property is pointed to a real directory in the file system, the entire directory can be published by Zope, even as a virtual host. Especially, the .php files under that directory will be directly passed to PHP CGI without DTML rendering. For example, you can now make phpMyAdmin installed in the file system run on Zope only by adding just one PHPGateway object.

Major Enhancements:

  • Using environment to interface to PHP. That will make it almost no difference than a PHP running under Apache in CGI mode. All GET and POST parameters will be correctly parsed and stored in appropreate variables regardless of how register_globals, variables_order, magic_quotes_gpc and any other directives are set in php.ini.
  • Cookies and sessions are supposed to work.
  • File uploading is also supported!
  • Passing REQUEST.other to PHP as a global variable $ZOPE_VARS.
  • The PHP script can use header() function to modify the header information.
  • HTTP authentication is now working.

Known Limitations:

  • Some user modifiable options are hard coded in source files. I'm looking for a better way for users to easily change these options without touching the source.
  • As PHP's include/require functions search scripts in the file system, those PHP scripts that use these functions may not work automatically in PHParser. Either refer to this How-To to modify your PHP scripts, or put all your scripts in a directory in the file system and use PHPGateway to run them.
  • Besides the $ZOPE_VARS passed, there isn't any easy way to access Zope objects within the PHP script being parsed. One possible way is to use XML-RPC, which is still under initial testing.
  • A complete change log can be found here.
  • PHParser/PHPGateway basically work with Plone. But has not been thoroughly tested.

Untested Functionalities:

  • Sessions.

Known Incompatibilities:

  • Some server and environment variables might be different from older versions. Please be careful if your scripts depend on PHP_SELF, DOCUMENT_ROOT, SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_TRANSLATED or PATH_INFO.

Thanks to these Zope Products:

Thanks to these Articles:


  • Mailing List:

    A PHParser mailing list is also available for me to announce new releases, for users to report bugs and for everyone that is interested in PHParser to exchange experiences and ideas. Join the list.

Available Releases

Version Maturity Platform Last Modified
1.1.5 Stable   2005-10-18 11:31:22
  PHParser-1.1.5.tar.gz (11 K) All md5
1.1.4 Stable   2005-10-12 02:09:36
  PHParser-1.1.4.tar.gz (11 K) All md5
1.1.3 Stable   2005-01-04 12:46:57
  PHParser-1.1.3.tar.gz (11 K) All md5
1.1.2 Stable   2005-01-04 12:46:59
  PHParser-1.1.2.tar.gz (11 K) All md5
1.1.1 Stable   2004-06-18 02:48:34
  PHParser-1.1.1.tar.gz (11 K) All md5
1.1.0 Development   2003-11-07 14:29:50
  PHParser-1.1.0.tar.gz (11 K) All md5
1.0.0 Development   2003-10-19 12:03:02
  PHParser-1.0.0.tar.gz (9 K) All md5
0.9.0 Stable   2003-10-19 12:03:01
  PHParser-0.9.0.tar.gz (6 K) All