Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 79442 invoked from network); 14 Mar 2009 13:54:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2009 13:54:15 -0000 Received: (qmail 611 invoked by uid 500); 14 Mar 2009 13:54:04 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 595 invoked by uid 500); 14 Mar 2009 13:54:03 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 586 invoked by uid 99); 14 Mar 2009 13:54:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 06:54:03 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mearns.b@gmail.com designates 209.85.217.179 as permitted sender) Received: from [209.85.217.179] (HELO mail-gx0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 13:53:55 +0000 Received: by gxk27 with SMTP id 27so4362154gxk.0 for ; Sat, 14 Mar 2009 06:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YBI3O5TqQq8Hg+qg2cmenYNXZMA8u+HTl6JO8TDPpu0=; b=XsvIzvpkcH7p5Tk4oXhZk8c2VwvbMPH3yVFoyBaj0ehSmz7IgFrfC76B+QiYc9R6bI kLF+wYxthy/Qjx3+FqGue4zG41EYLmT9PPEMiv31zT41gwI11MSRr910B6UanzpVSYwd ywfjnNIDe80xUMppQpT7ASO27kB4HdNW73zWc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kevtR87A4zzvi032MlRn3FgvhSQcgL6AlzAjwErAedZAOhpbWmPB85IWSgiSUX1tCC AU97kh97km3wpyazLdoVA6qawtonDBka3gWwvmfXzZVz2/DNuB0woA3IbsoPLLb0F7Th ToYBgqRZdmPAgIPHKoTbA0jMIH1AvGGLh7H3E= MIME-Version: 1.0 Received: by 10.231.10.68 with SMTP id o4mr514213ibo.2.1237038803606; Sat, 14 Mar 2009 06:53:23 -0700 (PDT) In-Reply-To: <49BB9C08.7080001@ice-sa.com> References: <4df3a1330903132209h7f1a5da8s42728105a112f923@mail.gmail.com> <49BB9C08.7080001@ice-sa.com> Date: Sat, 14 Mar 2009 09:53:23 -0400 Message-ID: <4df3a1330903140653j3dd5715ega9cfe4833f838d21@mail.gmail.com> From: Brian Mearns To: users@httpd.apache.org, aw@ice-sa.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] PHP script as Apache filter or "callback" On Sat, Mar 14, 2009 at 7:59 AM, Andr=E9 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 ? http://www.php.net/support.php 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. > http://perl.apache.org/docs/2.0/user/handlers/filters.html > > ;-) > > (Note: that's not as silly as it sounds. As language, perl and PHP are > reasonably close. =A0And since mod_perl is very closely integrated into A= pache > (much more than mod_php), what you will read there will give you a very g= ood > idea of how filters work in Apache) > Thanks, Andr=E9, I'll take a look at the tutorial and see what I can come u= p with. -Brian --=20 Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://pgp.mit.edu/ --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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