Philip M. Gollucci пишет:
>Vladimir S. Tikhonjuk wrote:
>
>
>>Philip M. Gollucci пишет:
>>
>>
>>
>>>Vladimir S. Tikhonjuk wrote:
>>>
>>>
>>>
>>>
>>>>I set in httpd.conf variable like: PerlSetVar var test;
>>>>
>>>>How can I get it in the startup.pl script ?
>>>>
>>>>
>>>>
>>>>
>>>http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetVar_
>>>
>>>You might want to read and re-read and re-read and re-read ....
>>>The 2.0 Users Guide here:
>>>http://perl.apache.org/docs/2.0/user/
>>>
>>>HTH
>>>
>>>
>>>
>>Well, nice advise, but where can I get $r ( Apache2::RequestRec )
>>variable in startup.pl script ?
>>In handler script - everything is O.K. But startup.pl!
>>
>>
>http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_request_
>
>But that doesn't help you either.
>httpd.conf:
> PerlSetEnv var test
>
>startup.pl:
> print STDERR "test => $ENV{test}\n"
>
>
>or you might look at
> bash: export var='test' / tcsh: setenv var test
> httpd.conf:
> PerlPassEnv var
>
Well, now I'll try to explain why I have asked such question. I have
startup.pl with connect_on_init dunction.
Also, I want to use Apache::AuthDBI. And I want options for
Apache::DBI->connect(...) to be stored into httpd.conf
or another but the only place.
I think that I could declare vars into httpd.conf and then use it in
startup.pl and Apache::AuthDBI.
Storing connection options such as login and password into
environment vars - not very good idea, I thik :)
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.