Autoprepending scripts with Apache

Victor Tsaran tsar at sylaba.poznan.pl
Sat Dec 1 09:50:51 EST 2001


Hi, Rich!
Thanks a lot. But do you think this will not put an additional load on the
server? Does that mean that now every .html file will be parsed for PHP
code?
Woops, I check myself on this: the .html files are parsed for PHP code
already, so, I guess, I should have discarded this message already!!! But
maybe it will answer someone's pending question!
Best regards,
Victor

----- Original Message -----
From: "Rich Caloggero" <rjc at MIT.EDU>
To: <speakup at braille.uwo.ca>
Sent: Friday, November 30, 2001 8:14 PM
Subject: Re: Re: Autoprepending scripts with Apache


> Well, what I did to test it is to first, make all html scripts be seen by
> the php interpreter by registering .html as a mime type. Add a line like
> this to     your httpd.conf file:
>     AddType application/x-httpd-php .html
> You don't have to put php code in your .html files. Then php sees all
files
> that have a .html extension, so the auto_prepend_file configuration
variable
> gets honored for each file with a .html extension.
>
>                     Rich
>
> ----- Original Message -----
> From: "Victor Tsaran" <tsar at sylaba.poznan.pl>
> To: <speakup at braille.uwo.ca>
> Sent: Friday, November 30, 2001 4:46 AM
> Subject: Re: Re: Autoprepending scripts with Apache
>
>
> > But I think this only works if the "main" file is a .php script.
> > Victor
> >
> > ----- Original Message -----
> > From: "Rich Caloggero" <rjc at MIT.EDU>
> > To: <speakup at braille.uwo.ca>
> > Sent: Friday, November 30, 2001 7:02 AM
> > Subject: Re: Re: Autoprepending scripts with Apache
> >
> >
> > > You write:
> > > > You are right, the "action" keyword is of much help here. One has to
> > > > establish a handler  and use it in conjunction with the "action".
> > >
> > > If your using php, you can just use the php configuration variable
> > > auto_prepend_file. Here's the documentation from the manual at
> www.php.net
> > >
> > > auto_prepend_file
> > > string
> > >
> > > Specifies the name of a file that is automatically parsed before the
> main
> > > file. The file is included as if it was called with the
> > > include()
> > > function, so
> > > include_path
> > > is used.
> > >
> > > The special value none disables auto-prepending.
> > > ----- Original Message -----
> > > From: "Victor Tsaran" <tsar at sylaba.poznan.pl>
> > > To: <speakup at braille.uwo.ca>
> > > Sent: 28 November, 2001 11:33 AM
> > > Subject: Re: Re: Autoprepending scripts with Apache
> > >
> > >
> > > thanks for the message. I found my question partially answered in the
> > > Apache's FAQ.
> > > You are right, the "action" keyword is of much help here. One has to
> > > establish a handler  and use it in conjunction with the "action".
> > > Best and thanks,
> > > Vic
> > >
> > > ----- Original Message -----
> > > From: "Ari Moisio" <armoi at sci.fi>
> > > To: "Speakup mailing list" <speakup at braille.uwo.ca>
> > > Sent: Wednesday, November 28, 2001 12:50 PM
> > > Subject: OT: Re: Autoprepending scripts with Apache
> > >
> > >
> > > > Hello
> > > >
> > > >   Action keyword might help, somethin like
> > > > action text/html your/script.php
> > > > inhttpd.conf
> > > >
> > > >   That script will toutput requested page to its standard input.
File
> > > > name is at some environment variable, $PATH_TRANSLATED iirc.
> > > >
> > > > Victor Tsaran 28.11.01:
> > > >
> > > > >Those of you, who are experts in Apache server administration. Do
you
> > > know
> > > > >if there is an option to auto_prepend a certain script to any .html
> > file
> > > > >parsed by the server? For example, I have a script written in PHP
and
> I
> > > want
> > > > >it to be attached to every .html file of the website. Please note
> that
> > I
> > > > >would like to avoid using SSI because this would involve modifying
> all
> > > the
> > > > >pages on the website.
> > > > >Would be grateful for any advice.
> > > > >Victor
> > > > >
> > > >
> > > > --
> > > > Mr. Ari Moisio, Niittykatu 7, 41160 Tikkakoski, +358-40-5055239
> > > > ari.moisio at iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Speakup mailing list
> > > > Speakup at braille.uwo.ca
> > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> > > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Speakup mailing list
> > > Speakup at braille.uwo.ca
> > > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> > >
> >
> >
> >
>
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>





More information about the Speakup mailing list