Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 24875 invoked from network); 28 Jun 2000 16:39:24 -0000 Received: from e21.nc.us.ibm.com (32.97.136.227) by locus.apache.org with SMTP; 28 Jun 2000 16:39:24 -0000 Received: from southrelay02.raleigh.ibm.com (southrelay02.raleigh.ibm.com [9.37.3.209]) by e21.nc.us.ibm.com (8.9.3/8.9.3) with ESMTP id MAA46114; Wed, 28 Jun 2000 12:29:10 -0500 From: rubys@us.ibm.com Received: from d54mta04.raleigh.ibm.com (d54mta04.raleigh.ibm.com [9.67.228.36]) by southrelay02.raleigh.ibm.com (8.8.8m3/NCO v4.9) with SMTP id MAA51672; Wed, 28 Jun 2000 12:39:15 -0400 Received: by d54mta04.raleigh.ibm.com(Lotus SMTP MTA v4.6.5 (863.2 5-20-1999)) id 8525690C.005B7B6D ; Wed, 28 Jun 2000 12:39:13 -0400 X-Lotus-FromDomain: IBMUS To: cocoon-dev@xml.apache.org, php-dev@lists.php.net Message-ID: <8525690C.00593C11.00@d54mta04.raleigh.ibm.com> Date: Wed, 28 Jun 2000 11:20:09 -0400 Subject: *preliminary* PHP generator committed Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N OK, I've committed to the cocoon-2 branch the beginnings of a PHP generator. A suitably configured system will invoke the PHP binaries through JNI and the output of the page will be processed through the configured XML parser and placed into the pipeline for processing by such filters as XSLT. This enables PHP developers to access the powers of Cocoon to separate their content, style, and logic without requiring them to write a single line of Java code. To build, one needs to first build PHP as a servlet. Then copy the resulting phpsrvlt.jar into xml-cocoon-lib and build cocoon. Then copy both phpsrvlt.jar and cocoon.jar into Tomcat's lib directory, and add the php servlet DLL or shared library to your path/LD_LIBRARY_PATH. To configure, simply add the following to your configuration ...and then use this generator in a process. This has been developed using JDK 1.2.2 on Win2K with Tomcat, but should run on pretty much any OS supported by PHP and Java, any JDK 1.1 or better, and any servlet 2.0 or better engine. You do need cocoon2 and PHP 4.0.1 however, neither of which has been released. Warning: what I have committed has only been tested to the point where it processes a simple "hello world" style page. An example of known problems include error recovery - the default behavior of PHP is to insert an error message into the output stream. While this default error message is valid HTML, it is not well formed XML; the result being that instead of seeing what you did wrong, you see a message about an unmatched
tag. I expect to evolve this quickly and have the code ready for prime time by the O'Reilly Open Source conference in Monterey. - Sam Ruby