You are not logged in Log in Join
You are here: Home » Members » mjablonski » PHParser - a PHP-Parser for ZOPE

Log in
Name

Password

 
 

Folder icon PHParser - a PHP-Parser for ZOPE

Please note: I do not maintain the PHParser anymore because I've converted all my PHP/MySQL-Scripts to Zope/Python/ZCatalog. PHParser has fulfilled his historical mission for me and I'm very glad of getting rid of PHP...

Wei He has taken over this project and released a better version of PHParser. You can download it here: http://www.zope.org/Members/hewei/PHParser.

PHParser is a ZOPE-Product which is based heavily on the DTML-Document-Class. A PHParser will give you all the features of a DTML-Document + all the features of PHP. This means that you can mix DTML into your PHP-Code.

PHParser is a real subclass of the DTML-Document-class. So you can use Cache-Managers, FTP, WebDav and so on a PHParser. To state it clearly: PHParser only modifies the __caller__-function from the DTML-Document-class, the rest is acquired from the DTML-Document-class.

PHParser works as a postprocessor: After rendering all DTML-tags in your document, PHParser will pipe the result through an external PHP-Interpreter. PHParser submits the QUERY_STRING via the environment and sets the $PHP_SELF-variable, which isn't set normally if you invoke PHP as an interpreter. So most simple scripts will work without changes (at least mine did so..;-)). The header and body of the returned result will be decoded, so you can use PHP-'Header'-functions. This is useful for redirects {Header(Location: http://www.zope.org/)} and the creation of images.

The php codes are interpreted by the "php" execution file. If users have build PHP as an Apache Module, this file doesn't exist. In other words: You have to compile/install PHP as a Command-Line-Intepreter and make sure that ZOPE can execute it.

If PHParser won't work on Windows, please (un)comment the PHPath-Variable at the beginning of PHParser.py.

 Title   Type   Size   Modified   Status 
 Changes Edit object Document 1 K 2002-04-15 published
 PHParser-0.20316 Edit object Software Release   2002-04-05 published
 PHParser-0.20409 Edit object Software Release   2002-04-10 published
 PHParser-0.20413 Edit object Software Release   2002-04-15 published