You are not logged in Log in Join
You are here: Home » Members » hewei » PHParser/PHPGateway

Log in
Name

Password

 
 

Folder icon PHParser/PHPGateway

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:

Resources:

  • 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.

 Title   Type   Size   Modified   Status 
 How to make include/require functions work in PHParser Edit object HowTo 2 K 2004-01-18 published
 PHParser 0.9.0 released Edit object expired News Item 1 K 2003-10-19 published
 PHParser 1.0.0 released Edit object News Item 1 K 2003-10-19 published
 PHParser 1.1.0 released Edit object News Item 1 K 2003-11-07 published
 PHParser 1.1.3 releasd Edit object News Item 1 K 2004-12-26 published
 PHParser 1.1.4 releasd Edit object News Item 1 K 2005-10-12 published
 PHParser 1.1.5 releasd Edit object News Item 1 K 2005-10-18 published
 PHParser Changes Edit object Document 5 K 2005-10-18 published
 PHParser-0.9.0 Edit object Software Release   2003-10-19 published
 PHParser-1.0.0 Edit object Software Release   2003-10-19 published
 PHParser-1.1.0 Edit object Software Release   2003-11-07 published
 PHParser-1.1.1 Edit object Software Release   2004-06-18 published
 PHParser-1.1.2 Edit object Software Release   2005-01-04 published
 PHParser-1.1.3 Edit object Software Release   2005-01-04 published
 PHParser-1.1.4 Edit object Software Release   2005-10-12 published
 PHParser-1.1.5 Edit object Software Release   2005-10-18 published