* Autoprepending scripts with Apache @ Victor Tsaran ` OT: " Ari Moisio 0 siblings, 1 reply; 10+ messages in thread From: Victor Tsaran @ UTC (permalink / raw) To: Speakup List Hello, listers! 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* OT: Re: Autoprepending scripts with Apache Autoprepending scripts with Apache Victor Tsaran @ ` Ari Moisio ` Victor Tsaran 0 siblings, 1 reply; 10+ messages in thread From: Ari Moisio @ UTC (permalink / raw) To: Speakup mailing list 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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` OT: " Ari Moisio @ ` Victor Tsaran ` Rich Caloggero 0 siblings, 1 reply; 10+ messages in thread From: Victor Tsaran @ UTC (permalink / raw) To: speakup 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@sci.fi> To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Victor Tsaran @ ` Rich Caloggero ` Victor Tsaran 0 siblings, 1 reply; 10+ messages in thread From: Rich Caloggero @ UTC (permalink / raw) To: speakup 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@sylaba.poznan.pl> To: <speakup@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@sci.fi> To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Rich Caloggero @ ` Victor Tsaran ` Rich Caloggero 0 siblings, 1 reply; 10+ messages in thread From: Victor Tsaran @ UTC (permalink / raw) To: speakup But I think this only works if the "main" file is a .php script. Victor ----- Original Message ----- From: "Rich Caloggero" <rjc@MIT.EDU> To: <speakup@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@sylaba.poznan.pl> > To: <speakup@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@sci.fi> > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Victor Tsaran @ ` Rich Caloggero ` Victor Tsaran 0 siblings, 1 reply; 10+ messages in thread From: Rich Caloggero @ UTC (permalink / raw) To: speakup 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@sylaba.poznan.pl> To: <speakup@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@MIT.EDU> > To: <speakup@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@sylaba.poznan.pl> > > To: <speakup@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@sci.fi> > > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > > > > > _______________________________________________ > > > Speakup mailing list > > > Speakup@braille.uwo.ca > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Rich Caloggero @ ` Victor Tsaran ` Rich Caloggero 0 siblings, 1 reply; 10+ messages in thread From: Victor Tsaran @ UTC (permalink / raw) To: speakup 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@MIT.EDU> To: <speakup@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@sylaba.poznan.pl> > To: <speakup@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@MIT.EDU> > > To: <speakup@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@sylaba.poznan.pl> > > > To: <speakup@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@sci.fi> > > > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > > > > > > > > > _______________________________________________ > > > > Speakup mailing list > > > > Speakup@braille.uwo.ca > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Speakup mailing list > > > Speakup@braille.uwo.ca > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Victor Tsaran @ ` Rich Caloggero ` Victor Tsaran 0 siblings, 1 reply; 10+ messages in thread From: Rich Caloggero @ UTC (permalink / raw) To: speakup Ya, probably the server will have to work a bit harder, but not that much. Maybe if you were running a high-profile public server which gets thousands of hits a day, it might be good to optimize a bit, but in most cases, I think the convenience outweighs the expense. I don't think any files are parsed by PHP unless their file types are registered as PHP files. If you tell the server with the AddType that .html files contain (or may contain) PHP code, then PHP will parse them. Rich ----- Original Message ----- From: "Victor Tsaran" <tsar@sylaba.poznan.pl> To: <speakup@braille.uwo.ca> Sent: 01 December, 2001 9:50 AM Subject: Re: Re: Autoprepending scripts with Apache 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@MIT.EDU> To: <speakup@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@sylaba.poznan.pl> > To: <speakup@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@MIT.EDU> > > To: <speakup@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@sylaba.poznan.pl> > > > To: <speakup@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@sci.fi> > > > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > > > > > > > > > _______________________________________________ > > > > Speakup mailing list > > > > Speakup@braille.uwo.ca > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Speakup mailing list > > > Speakup@braille.uwo.ca > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Rich Caloggero @ ` Victor Tsaran ` Rich Caloggero 0 siblings, 1 reply; 10+ messages in thread From: Victor Tsaran @ UTC (permalink / raw) To: speakup No, actually, when PHP works as a module, it parses all the .html files. This is why you can embed PHP code directly into HTML pages. Vic ----- Original Message ----- From: "Rich Caloggero" <rjc@MIT.EDU> To: <speakup@braille.uwo.ca> Sent: Saturday, December 01, 2001 10:31 PM Subject: Re: Re: Autoprepending scripts with Apache > Ya, probably the server will have to work a bit harder, but not that much. > Maybe if you were running a high-profile public server which gets thousands > of hits a day, it might be good to optimize a bit, but in most cases, I > think the convenience outweighs the expense. I don't think any files are > parsed by PHP unless their file types are registered as PHP files. If you > tell the server with the AddType that .html files contain (or may contain) > PHP code, then PHP will parse them. > > Rich > > ----- Original Message ----- > From: "Victor Tsaran" <tsar@sylaba.poznan.pl> > To: <speakup@braille.uwo.ca> > Sent: 01 December, 2001 9:50 AM > Subject: Re: Re: Autoprepending scripts with Apache > > > 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@MIT.EDU> > To: <speakup@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@sylaba.poznan.pl> > > To: <speakup@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@MIT.EDU> > > > To: <speakup@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@sylaba.poznan.pl> > > > > To: <speakup@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@sci.fi> > > > > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Speakup mailing list > > > > > Speakup@braille.uwo.ca > > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Speakup mailing list > > > > Speakup@braille.uwo.ca > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Autoprepending scripts with Apache ` Victor Tsaran @ ` Rich Caloggero 0 siblings, 0 replies; 10+ messages in thread From: Rich Caloggero @ UTC (permalink / raw) To: speakup Vic wrote: No, actually, when PHP works as a module, it parses all the .html files. This is why you can embed PHP code directly into HTML pages. Vic If you remove the AddType line in you httpd.conf file which associates .php files with PHP code and then point your server at a document with imbeded PHP code in it, it will not act on it. To be honest, I'm not sure if it gets parsed, but I'm pretty sure the PHP module isn't even involved unless apache, through the AddType mechanism, decides that the file being served is a PHP file. If it is, then the PHP interpreter gets to deal with it before the results get served. Rich ----- Original Message ----- From: "Victor Tsaran" <tsar@sylaba.poznan.pl> To: <speakup@braille.uwo.ca> Sent: 01 December, 2001 6:13 PM Subject: Re: Re: Autoprepending scripts with Apache No, actually, when PHP works as a module, it parses all the .html files. This is why you can embed PHP code directly into HTML pages. Vic ----- Original Message ----- From: "Rich Caloggero" <rjc@MIT.EDU> To: <speakup@braille.uwo.ca> Sent: Saturday, December 01, 2001 10:31 PM Subject: Re: Re: Autoprepending scripts with Apache > Ya, probably the server will have to work a bit harder, but not that much. > Maybe if you were running a high-profile public server which gets thousands > of hits a day, it might be good to optimize a bit, but in most cases, I > think the convenience outweighs the expense. I don't think any files are > parsed by PHP unless their file types are registered as PHP files. If you > tell the server with the AddType that .html files contain (or may contain) > PHP code, then PHP will parse them. > > Rich > > ----- Original Message ----- > From: "Victor Tsaran" <tsar@sylaba.poznan.pl> > To: <speakup@braille.uwo.ca> > Sent: 01 December, 2001 9:50 AM > Subject: Re: Re: Autoprepending scripts with Apache > > > 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@MIT.EDU> > To: <speakup@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@sylaba.poznan.pl> > > To: <speakup@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@MIT.EDU> > > > To: <speakup@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@sylaba.poznan.pl> > > > > To: <speakup@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@sci.fi> > > > > To: "Speakup mailing list" <speakup@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@iki.fi http://www.iki.fi/arimo PGP-keyID: 0x3FAF0F05 > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Speakup mailing list > > > > > Speakup@braille.uwo.ca > > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Speakup mailing list > > > > Speakup@braille.uwo.ca > > > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > > > > > > > > > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > > > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Autoprepending scripts with Apache Victor Tsaran
` OT: " Ari Moisio
` Victor Tsaran
` Rich Caloggero
` Victor Tsaran
` Rich Caloggero
` Victor Tsaran
` Rich Caloggero
` Victor Tsaran
` Rich Caloggero
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).