> > I am testing the use of Apache::PerlVINC but I think I must
> > do something wrong because I get an error on the PerlRequire
> > statement in the following bit of httpd.conf when starting
> > apache:
>
> > PerlINC /opt/ward/IDV/DEV/Modules
> > PerlRequire Ward/IDV/IDVDatabase.pm
>
> PerlINC modifies @INC at request time to pick up the different version of
> your PerlRequire'd module. however, mod_perl needs to be able to find
> this module at startup time as well. you'll need to 'use lib ...' or
> similar so your PerlRequire'd module can be found at startup time if it's
> not already somewhere in @INC.
Ok, I have added 'use lib qw(/opt/ward/IDV/DEV/Modules);' to my startup.pl,
but now I get the following error in my error log:
Syntax error on line 339 of /opt/ward/apache/conf/httpd.conf:
Invalid command 'PerlINC', perhaps mis-spelled or defined by a module not
included in the server configuration
line 339 is the PerlINC line above. I have 'PerlModule Apache::PerlVINC' in
my httpd.conf file (I have tried moving it to startup.pl, but that doesn't
make any difference). Relevant part of httpd.conf attached again.
Any other suggestions? Could it have something to do with my virtual host
sections (I have more virtual host sections with Apache::PerlVINC stuff
in)?
Kees
PS. I wouldn't mind helping out maintaining this module, but I am not sure
I understand it 100%. (Like why is it failing in this situation.) I had a
look at Makefile.PL and PerlVINC.pm, though I have to read up on
DynaLoader, ExtUtils::MakeMaker and Apache::ExtUtils, I think I get the
gist of it. For instance should PerlINC's 'errmsg' in Makefile.PL say 'a
path' instead of 'On or Off'? But I presume that doesn't make any
difference to my situation.
----------------------------------------
PerlModule Apache::PerlVINC
<VirtualHost _default_:8443>
DocumentRoot /opt/ward/DocumentRoot
SetEnv IDV_ENV DEV
Alias /idv/ "/opt/ward/IDV/DEV/Scripts"
<Location /idv>
Options +Indexes
PerlAuthzHandler Ward::Authorise
SetHandler perl-script
PerlHandler Apache::Registry
AuthType Basic
AuthName "IDV Development"
AuthAuthoritative on
require idvenv DEV
#line 339
PerlINC /opt/ward/IDV/DEV/Modules
PerlVersionINC On
PerlFixupHandler Apache::PerlVINC
PerlRequire Ward/IDV/IDVDatabase.pm
</Location>
##
## This can also go in a <VirtualHost> section
##
<IfDefine SSL>
SSLEngine on
SSLCertificateFile /opt/ward/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /opt/ward/apache/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</IfDefine>
</VirtualHost>