in reply to mod_perl, PerlSetEnv, and PERL5LIB

PerlSetVar PERL5LIB /home/httpd/website.com/libs
uhm, i think this is the wrong way to set an environment variable. as the docs say, variables set by PerlSetVar are only available to the apache API: mod_perl

so just use PerlSetEnv, as you did in the title of this node...

Replies are listed 'Best First'.
Re^2: mod_perl, PerlSetEnv, and PERL5LIB
by geektron (Curate) on Jul 28, 2004 at 15:31 UTC
    well, i changed the modperl.site.conf (that's loaded by the main httpd.conf via Include this morning to read as such:
    PerlSetEnv PERL5LIB /home/httpd/website.com/libs PerlModule RemoteAuthentication PerlSetVar websitePath /testMemberArea/ PerlSetVar websiteLoginScript /apps/login.pl PerlSetVar websiteDomain .website.com PerlSetVar websiteExpires +1h
    and the VH.conf to read:
    ## These documents require user to be logged in. <Directory /home/httpd/website.com/html/testMemberArea> AuthType RemoteAuthentication AuthName website PerlAuthenHandler RemoteAuthentication->authenticate PerlAuthzHandler RemoteAuthentication->authorize require valid-user </Directory>
    and that looks right to me, but i still get:
    sudo /usr/sbin/apachectl configtest Syntax error on line 7 of /etc/httpd/conf/VH/modperl.website.com: Can't locate RemoteAuthentication.pm in @INC (@INC contains: /usr/lib/ +perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/per +l5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5 +.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-l +inux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/ven +dor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/ +5.8.0 . /usr/ /usr/lib/perl) at (eval 7) line 3.
    i've tried things like:
    PerlSetEnv PERL5LIB PERL5LIB:/home/httpd/website.com/libs
    to no avail ...
      hmm, sorry, i thought it would work... (googling for it also suggests it should). anyway, i'd go for the startup.pl alternative, that's a common thing to do with mod_perl.
        unfortunately, that means migrating some 50 VirtualHosts to the schema.

        it *does* work -- for other VirtualHosts on this machine but this one.