You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ryan McDonald <rm...@futurebrand.com> on 2006/08/15 21:43:47 UTC

[users@httpd] Dynamically creating php files and serving in apache

Right now using Apache 2.0.54 and mod_jk to connect with Tomcat 5.0.28.

We have a requirement that the pages served by tomcat be php, these  
pages should then be handled by mod_php then sent back to the  
client.  Is this possible? If so what should I be using. I've been  
playing around with no luck so far.

Any help is appreciated,
Ryan

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Dynamically creating php files and serving in apache

Posted by Pid <p...@pidster.com>.
Joshua Slive wrote:
> On 8/15/06, Ryan McDonald <rm...@futurebrand.com> wrote:
>> Right now using Apache 2.0.54 and mod_jk to connect with Tomcat 5.0.28.
>>
>> We have a requirement that the pages served by tomcat be php, these
>> pages should then be handled by mod_php then sent back to the
>> client.  Is this possible? If so what should I be using. I've been
>> playing around with no luck so far.
>>
>> Any help is appreciated,
> 
> This won't work with the standard php installation, because it
> implements php as an apache handler, not a filter.  There is a
> filter-based sapi module included with php, but I have no idea how
> stable it is and I don't even know how to activate it.  A php forum
> would probably have more information.
> 
> And by the way, you do understand how insane an idea that is ;-)?
> Tomcat and php are complex enough on their own.  Combining them seems
> like an absolute nightmare to me.  And probably a source for obscure
> security problems as well.

I concur.

Both JSP and PHP are dynamic page languages, using one to generate a 
parsable page in the another would be next to impossible to debug, let 
alone any other issues.

You should be able to achieve your actual* requirement using one 
language only.

Or do you really mean that the page URLs should end in PHP?
If you do, then just map the PHP extension to Tomcat in the same way as 
you do with JSP, then tweak Tomcat to parse PHP files.

(Add "php" to "jsp,jspx" in the JSP servlet in tomcat/conf/web.xml)


*Meaning the function that page performs.


> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Dynamically creating php files and serving in apache

Posted by Joshua Slive <jo...@slive.ca>.
On 8/15/06, Ryan McDonald <rm...@futurebrand.com> wrote:
> Right now using Apache 2.0.54 and mod_jk to connect with Tomcat 5.0.28.
>
> We have a requirement that the pages served by tomcat be php, these
> pages should then be handled by mod_php then sent back to the
> client.  Is this possible? If so what should I be using. I've been
> playing around with no luck so far.
>
> Any help is appreciated,

This won't work with the standard php installation, because it
implements php as an apache handler, not a filter.  There is a
filter-based sapi module included with php, but I have no idea how
stable it is and I don't even know how to activate it.  A php forum
would probably have more information.

And by the way, you do understand how insane an idea that is ;-)?
Tomcat and php are complex enough on their own.  Combining them seems
like an absolute nightmare to me.  And probably a source for obscure
security problems as well.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org