httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <ras...@apache.org>
Subject Re: SSI and PHP on the same web page
Date Mon, 12 Aug 2002 05:25:57 GMT
There is no way around that, at least not with Apache 1.3.  Both mod_php
and mod_include (which handles SSI) are what are known as content
handlers.  Only a single content handler can be activated per request.  If
you enable both SSI and PHP on the same file extension, then depending on
the ordering of your modules in your httpd.conf one will take the request
and the other won't.

In Apache2 there is the concept of stacked handlers which means that you
can configure it to first pass it through mod_include then mod_php or
vice-versa meaning that both sets of tags would be parsed.  Or you could
even have one handler generating tags parsed by the next handler.

Sounds very nice in theory and it may even work one day.

-Rasmus

On Sun, 11 Aug 2002, Glen Lee Edwards wrote:

> On Sunday 11 August 2002 10:57 pm, Michael Warwick wrote:
> > I have used SSI to include a php script. Not sure what settings made
> > it work. Generally it is easier to just to do with php what you would
> > have done with SSI, use include() or require() to include other
> > files, exec() to execute system commands or $ENV_xxx to access
> > environment variables. Also using just php avoids double handling
> > which will slow down the delivery of your pages.
>
> Michael,
>
> I wish it was that easy.  I'm providing hosting for web site developers
> who run the gamut from "don't know what ftp is" to fairly geeky.  Some
> want SSI, some PHP.  At this point I have PHP working on .html and
> .php[x], and SSI working on .shtml.  If they want SSI on .html they'll
> have to do your approach.  If they want PHP on .shtml they have to SSI
> it.
>
> Glen
>
>
> > -----Original Message-----
> > From: Glen Lee Edwards [mailto:glen@fcwm.org]
> > Sent: Monday, 12 August 2002 3:44 p.m.
> > To: users@httpd.apache.org
> > Subject: SSI and PHP on the same web page
> >
> >
> > Is there a way to get SSI and PHP to both work on the same web page?
> > I haven't figured out how to configure Apache to do so.
> >
> > Glen
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message