cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Howard" <coc...@leverageweb.com>
Subject RE: PHP status?
Date Mon, 23 Dec 2002 14:01:14 GMT
I'm not a PHP user in cocoon, but I can provide some hints on the
information
you asked about.  First, the biggest clues come from an odd location
(http://xml.apache.org/cocoon/tutorial/tutorial-develop-webapp.html):

----------------------
PhpGenerator
This generator functions just like the JspGenerator, but with PHP templates.
The PHP must generate valid XML, and be a file in the context.

This generator requires a JAXP 1.1 compliant parser and the phpservlet.jar
file that comes from http://php.net. Install the files in the WEB-INF/libs
directory. The PhpGenerator is not Cacheable.
--------------------------------------------

So,

> -----Original Message-----
> From: Alex McLintock [mailto:alex@OWAL.co.uk]
> Sent: Monday, December 23, 2002 6:22 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: PHP status?
>
>
> I asked about PHP within Cocoon and
>
> At 23:32 22/12/02, Nicola Ken Barozzi wrote:
>
> >"
> >  * Allows PHP to be used as a generator.  Builds upon the PHP servlet
> >  * functionallity - overrides the output method in order to pipe the
> >  * results into SAX events.
> >"
> >
> >Looking at the code, it takes the Request, calls a PhPServlet,
> and injects
> >the PHPServlet result into Cocoon as a Sax Stream.
>
>
> Ok, so it looks like if I need information I'll have to figure it out
> myself. (So what's new :-)
>
> For instance I am not sure how the PHPServlet fits in to this -
> is it part
> of Cocoon?

No, it's from php.net, although I don't know if the exact name given in that
doc is
still valid - it may ship with the default distribution of PHP though.

>
> I assumed that PHP had to be run by the compiled C apache module rather
> than a separate servlet.

You'll have to look at the php site for more information there - it seems
the servlet does depend on PHP being installed.
http://www.php.net/manual/en/ref.java.php

>
> I am not sure how it maintains state between calls - ie does my Cocoon
> sitemap have to know about all the potential parameters which my PHP code
> may use.... Hmmm.

You'll have to look in the code of PHPGenerator to confirm, but I believe
that
cocoon will pass the request object to the servlet, so potentially all
request
parameters should survive.  However, I don't believe that cookies share the
same luck, but again you'll have to check it out yourself.

Hope that helps,
Geoff Howard


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message