Hi Marco,
It was on the list:
---
[Cocoon Devel] *preliminary* PHP generator committed
[EMAIL PROTECTED] [EMAIL PROTECTED]
Wed, 28 Jun 2000 11:20:09 -0400
----------------------------------------------------------------------------
----
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
<generator name="php"
class="org.apache.cocoon.generators.PhpGenerator"/>
...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 <br> 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
-----Ursprüngliche Nachricht-----
Von: Marco Spinetti [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 30. Juli 2001 13:58
An: [EMAIL PROTECTED]
Betreff: R: PHP Generator
Hi Michael ,
can you explain me how install the PHP Generator?
THANKS
MARCO
----- Original Message -----
From: Michael Zehrer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 1:52 PM
Subject: PHP Generator
> Hi list,
>
> Can someone give me an example for using the php-Generator in Cocoon2 (not
> how to install it, but actually using it)?
>
> Regards Michael
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>