Interesting, I tried the following in perl.conf:
PerlRequire conf/startup.pl
PerlFreshRestart On
PerlSetEnv MOD_PERL_TRACE all
#Directory Handlers
#------------------
<Directory /perl>
AllowOverride None
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
</Directory>
<Directory ~ "^/(cgi-bin|htdocs|perl)$">
PerlAccessHandler Apache::GateKeeper
ErrorDocument 403 /index.html
<Files ~ "/(index\.html|login\.cgi)$">
PerlAccessHandler Apache::OK
</Files>
</Directory>
<Perl>
$ENV{'SERVER_ROOT'} = Apache::server_root_relative();
</Perl>
but, the <Perl> Block Directive issues this error on restart:
Syntax error on line 26 of /home/dvlp/jcrotty/apache/conf/perl.conf:
Usage: Apache::server_root_relative(rsv, name="") at
/home/dvlp/jcrotty/apache/conf/perl.conf line 25.
./apachectl restart: httpd could not be started
perl -cx reports syntax is OK
Any ideas would be greatly appreciated.
-----Original Message-----
From: Stathy Touloumis [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 10:51 AM
To: Joseph Crotty; [EMAIL PROTECTED]
Subject: RE: server_root question...
If you want to use a perl function ( Apache::server_root_relative() ) then
you have to use a Perl block.
This might work :
PerlSetEnv SERVER_ROOT \
<Perl>
Apache::server_root_relative()
</Perl>
But this seems so much easier :
<Perl>
$ENV{'SERVER_ROOT'} = Apache::server_root_relative()
</Perl>
> Maybe its too early or whatever. How would you go about setting
> $ENV{SERVER_ROOT} without using <Perl>. I was trying
>
> PerlSetEnv SERVER_ROOT Apache::server_root_relative()
>
> in perl.conf, but no go. Any ideas?