httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Mearns <>
Subject Re: [users@httpd] PHP script as Apache filter or "callback"
Date Sat, 14 Mar 2009 13:53:23 GMT
On Sat, Mar 14, 2009 at 7:59 AM, André Warnier <> wrote:
> Brian Mearns wrote:
>> I've got a PHP script that I want to call for every request under a
>> certain location. Specifically, I want to alter/set the response
>> headers using this script. I know headers can be set in other ways,
>> but in this case, the heders are set using some fairly complex logic
>> which I don't think can be done in the conf file directly, plus the
>> PHP script will have some other side effects on the server.
> Maybe you'd have more chances here ?

I don't think this is really a PHP issue; I already have the script
working, I just need to know how to apache to invoke it.

>> Does anyone know of a way to do this? If not, can anyone point me to a
>> good tutorial for writing apache filters?
> Sure.
> ;-)
> (Note: that's not as silly as it sounds. As language, perl and PHP are
> reasonably close.  And since mod_perl is very closely integrated into Apache
> (much more than mod_php), what you will read there will give you a very good
> idea of how filters work in Apache)

Thanks, André, I'll take a look at the tutorial and see what I can come up with.


Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message