You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Scott Alexander <mo...@humak.edu> on 2002/12/18 12:20:20 UTC

[OT] mod_proxy, mod_perl, php

At the moment I have a front_end server with no php support.

Backend is mod_perl. I'm planning to extend our document management
system to serve www pages.

The html documents are on the mod_perl machine. What happens if users add
php code to their html documents?

If I add php support on the front_end will it work normally?

Regards and thanks in advance for any help. And sorry if this is way off
topic. I don't know what mailing list to ask this on. I'm doing distance
work and living 150 km above the Arctic Circle ....

Scott


Re: [OT] mod_proxy, mod_perl, php

Posted by Perrin Harkins <pe...@elem.com>.
Scott Alexander wrote:
> No mod_perl doesn't serve the documents. I'm just using a PerlTranshandler
> to change the uri.

Okay, that should work then.

> So if I add php support to the mod_perl server. How much extra
> load/memory usage strain  will it add to the mod_perl server.

I don't know; that's a PHP question.

> If I add a www -management system to our existing intranet application I
> want that all the www pages are in the www -management system not php
> pages on the front_end (have to add php support of course) and html pages
> on the mod_perl server.

Sorry, I don't understand what you're talking about here.

> Or would it be better to have a nfs on the front_end accessible from the
> mod_perl server. So users can update the documents using the intranet
> application. Then www requests are handled only by the front end with now
> added php support.

I don't see any good reason not to put PHP on the backend and do all the 
page generation there.  It keeps the front-end simple too.

- Perrin


Re: [OT] mod_proxy, mod_perl, php

Posted by Scott Alexander <mo...@humak.edu>.
On Wed, 18 Dec 2002, Perrin Harkins wrote:

> Scott Alexander wrote:
> > At the moment I have a front_end server with no php support.
> >
> > Backend is mod_perl. I'm planning to extend our document management
> > system to serve www pages.
> >
> > The html documents are on the mod_perl machine. What happens if users add
> > php code to their html documents?
>
> Nothing, unless you add PHP support to that machine and make sure
> mod_perl is not serving those documents.  You can't have them both
> handle the same documents.
>

No mod_perl doesn't serve the documents. I'm just using a PerlTranshandler
to change the uri.

> > If I add php support on the front_end will it work normally?
>
> No, not if the front-end is proxying.  It has to be actually serving
> those documents locally in order to run them through PHP.
>
> - Perrin
>

So if I add php support to the mod_perl server. How much extra
load/memory usage strain  will it add to the mod_perl server.

The setup is front_end 2*550 PIII scsi drives 2 GB

mod_perl server 2*1200  scsi 36 GB 2GB

database server  2*1200  scsi 36 GB 2GB

About 30000 - 50000 scripts per day  plus 5000 rewrites using the
PerlTranshandler for the web pages.

Database machine is handling abou 2 million queries per day.

If I add a www -management system to our existing intranet application I
want that all the www pages are in the www -management system not php
pages on the front_end (have to add php support of course) and html pages
on the mod_perl server.

Or would it be better to have a nfs on the front_end accessible from the
mod_perl server. So users can update the documents using the intranet
application. Then www requests are handled only by the front end with now
added php support.


Best Regards

Scott


Re: [OT] mod_proxy, mod_perl, php

Posted by Perrin Harkins <pe...@elem.com>.
Scott Alexander wrote:
> At the moment I have a front_end server with no php support.
> 
> Backend is mod_perl. I'm planning to extend our document management
> system to serve www pages.
> 
> The html documents are on the mod_perl machine. What happens if users add
> php code to their html documents?

Nothing, unless you add PHP support to that machine and make sure 
mod_perl is not serving those documents.  You can't have them both 
handle the same documents.

> If I add php support on the front_end will it work normally?

No, not if the front-end is proxying.  It has to be actually serving 
those documents locally in order to run them through PHP.

- Perrin


Re: [OT] mod_proxy, mod_perl, php - RESEND

Posted by Raf <ra...@joshua.dreamthought.com>.
Still half asleep.  Stupid typos have been un-typofied:

On Wed, 18 Dec 2002, Raf wrote:

> On Wed, 18 Dec 2002, Scott Alexander wrote:
>
> > The html documents are on the mod_perl machine. What happens if users add
> > php code to their html documents?
> >
> > If I add php support on the front_end will it work normally?
>
 * Have you thought of setting a separate document root for php (if they
 are .html templates from one document root)?

 * Have you considered placing it on the proxied machine and getting your
 mod_perl handler to decline if it finds PHP tags (if they are all .html
 from one document root)?

 * If you :
 	* proxy *.html on the proxy server or whatever distinguishes
	your mod_perl content.
 	* catch all <Files *.php> on your proxy server

   that might do the trick.

> > topic. I don't know what mailing list to ask this on. I'm doing distance
> > work and living 150 km above the Arctic Circle ....

 Cool.  Very Cool.  Or even extremely cold. ;)

 I'm curious.  What are you working on?


 Rafiq





Re: [OT] mod_proxy, mod_perl, php

Posted by Raf <ra...@joshua.dreamthought.com>.
On Wed, 18 Dec 2002, Scott Alexander wrote:

> The html documents are on the mod_perl machine. What happens if users add
> php code to their html documents?
>
> If I add php support on the front_end will it work normally?

* Have you thought of setting a separate document route for php (if they
are .html templates from one document route)?

* Have you considered placing it on the proxied machine and getting your
mod_perl handler to decline if it finds PHP tags (if they are all .html
from one document root)?

* If you :
	* proxy *.html on the proxy server or whatever distingues your
mod_perl content.
	* catch all <Files *.php> on your proxy server

  that might do the trick.



> topic. I don't know what mailing list to ask this on. I'm doing distance
> work and living 150 km above the Arctic Circle ....

Cool.  Very Cool.  Or even extremely cold. ;)

I'm curious.  What are you working on?


Rafiq