apache2filter

Paul A. Houle ph18 at cornell.edu
Mon Apr 11 14:26:53 UTC 2005


On Fri, 08 Apr 2005 19:43:02 -0400, Marc Richards  
<mrichar1 at swarthmore.edu> wrote:

> Hey everyone,
>
> I saw in the release notes for RHEL 4 that they have switched from  
> apache2filter to apache2handler for processing PHP files.  I just  
> checked my copy of FC2 and noticed that apache2handler was being used as  
> well.  I have couple questions:
>
> 1) Will FC4 be using handler or the filter?
>
> 2) Does anybody know why the switch was made from handler to filter for  
> RHEL3 -> RHEL4 (and presumably RH9/FC1 -> FC2)?

	I've always had bad luck using the apache2filter instead of  
apache2handler;  one of the many reasons why it took so long for PHP to be  
'qualified' for Apache 2 is that they started out with apache2filter being  
the default server API,  and they never got it working 100% right.   
Apache2handler then became the default,  anad apache2handler works fine.

	The filter API has changed (for the better) in Apache 2.1,  and it may  
wind up working better with PHP.

> Using the filter (on RHEL3) allows me to easily include PHP output in my  
> regular html page by turning on the IncludesNoExec directive.  
> IncludesNoExec doesn't work using the handler because it only works with  
> text/* file types and in order to associate php files with the handler  
> you have to use AddType application/x-httpd-php .php.  Using the  
> Includes (no NoExec) directive is bad because it lets web developers  
> execute command line programs from within .html pages.
>
> Is there another way to achieve what I want with the apache2handler? or  
> is there some other flaw in my logic?
>

	Not to achieve exactly what you want,  but there are hundreds of ways of  
doing similar things.  I assume you don't want to let those developers  
write PHP?

  	One of my favorite strategies to write a PHP script that emulates the  
behavior of the static web server that adds behavior to the web server --  
that intercepts the request,  grabs an HTML file,  does some  
transformations on it,  and spits it out.  I built a nice system for  
templating web sites that's about 50 lines long and handles 100 pages/sec  
on 5 yr old hardware w/ no effort to speed it up.

	Also,  the first thing I do building a server is 'rpm --erase' the web  
server,  PHP and all that stuff and then build from source.  Most of the  
web servers I run need some funny stuff compiled in,  and it's more  
important for to have something that's uniform between various servers  
that run RHL 9,  RHEL 3,  Solaris and other fine operating systems rather  
than to have something that's the same as everyone who runs the quarterly  
flavor of Fedora.







More information about the fedora-devel-list mailing list