| Author |
Message |
Robert Nicholson *nix forums beginner
Joined: 03 Mar 2005
Posts: 3
|
Posted: Wed Jul 19, 2006 8:41 pm Post subject:
mod_perl and access to the parent processes environment?
|
|
|
So how can I set up the environment prior to launching httpd so that
these values are available in <Perl> stanza's in httpd.conf?
It doesn't look like this is possible.
It looks like the only thing I can do is say
-Ddefinesomething
and then in httpd.conf
ifdefined definesomething
do something
but I need to do more than this.
I want to be able to pass information from the script that launches
httpd and have that information available within a <Perl> stanza. |
|
| Back to top |
|
 |
Big and Blue *nix forums addict
Joined: 21 Feb 2005
Posts: 95
|
Posted: Thu Jul 20, 2006 12:09 am Post subject:
Re: mod_perl and access to the parent processes environment?
|
|
|
robert@elastica.com wrote:
| Quote: | So how can I set up the environment prior to launching httpd so that
these values are available in <Perl> stanza's in httpd.conf?
|
Set an environment variable then access it via %ENV?
| Quote: | I want to be able to pass information from the script that launches
httpd and have that information available within a <Perl> stanza.
|
You could also, of course, just include a file into httpd.conf which has
the relevant values set. If necessary this included file could be created
with the relevant values added in dynamically by the startup script.
--
Just because I've written it doesn't mean that
either you or I have to believe it. |
|
| Back to top |
|
 |
Mumia W. *nix forums Guru Wannabe
Joined: 08 May 2006
Posts: 153
|
Posted: Thu Jul 20, 2006 11:23 am Post subject:
Re: mod_perl and access to the parent processes environment?
|
|
|
On 07/19/2006 07:09 PM, Big and Blue wrote:
| Quote: | robert@elastica.com wrote:
So how can I set up the environment prior to launching
httpd so that these values are available in <Perl
stanza's in httpd.conf?
Set an environment variable then access it via %ENV?
I want to be able to pass information from the script
that launches httpd and have that information available
within a <Perl> stanza.
You could also, of course, just include a file into
httpd.conf which has the relevant values set. If necessary
this included file could be created with the relevant
values added in dynamically by the startup script.
|
That won't work out well because the server would have to be
restarted.
Robert, instead I suggest you modify an .htaccess file
instead. Htaccess files are re-read on each access. However, I
doubt you need to do this. Probably anything you can do in a
<Perl> section of an Apache config file can also be done in a
custom perl-handler.
HTH |
|
| Back to top |
|
 |
Big and Blue *nix forums addict
Joined: 21 Feb 2005
Posts: 95
|
Posted: Thu Jul 20, 2006 11:22 pm Post subject:
Re: mod_perl and access to the parent processes environment?
|
|
|
Mumia W. wrote:
| Quote: |
That won't work out well because the server would have to be
restarted.
|
The original question was:
| Quote: | So how can I set up the environment prior to launching
httpd.
|
"prior to launching" indicates to me that this is a one-off setting at
startup.
--
Just because I've written it doesn't mean that
either you or I have to believe it. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|