I'm a bit of a newbie with respect to mod_perl, but with some perseverence,
I seem to have googled and hacked my way 'round most of it.

A couple of problems continue to dog me, though:

Because of constraints by my service provider, I'm running apache/1.3.37
with mod_perl/1.30 under linux on both my production and development
servers. 

On my production server, I have no access to httpd/conf, so I have put the
various PERL init commands in .htaccess, thus:

Order allow,deny
Allow from all
Options Indexes FollowSymLinks MultiViews ExecCGI
DirectoryIndex index.pl
PerlModule Apache::Registry
PerlModule Apache::DBI
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
AddHandler perl-script .pl
PerlSendHeader On
PerlHandler Apache::Registry

Obviously, I want to keep as much similarity between my production and
development environments as I can, so I've done the same on the development
server. 

The directory stucture is fairly deep, but ends up as a project directory,
containing the .htaccess, a bunch of .pl files, and a CCC subdirectory
containing a bunch of .pm modules.

This all seems to work well enough, except that on reload, PERL is unable to
find the .pm files which it wants to re-compile:
[Fri Jun 29 17:28:59 2007] [error] Can't locate CCC/MyDBI.pm in @INC (@INC
contains: /usr/lib/perl5/5.8.8/i386-linux /usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i386-linux /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux /usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl . /etc/apache1/ /etc/apache1/lib/perl) at
/usr/lib/perl5/site_perl/5.8.8/Apache/Reload.pm line 132.\n

The first time after an apache restart (on the development box) it works
fine; obviously it is able to find CCC in the project directory, but after I
edit one of the .pm files, it all goes titsup.

Note that "." is present in @INC, but I guess it refers to "/", because I
can work round this by placing a symlink to CCC in my root directory on the
development server, and in my chroot home on the production server.
Annoying, but not too desperate.

The second, and I assume associated, problem is that I get a shedload of
warnings each time the modules are recompiled, of the form:

[Fri Jun 29 17:41:05 2007] MyDBI.pm: Subroutine update_site_params redefined
at CCC/MyDBI.pm line 3659.

I assume this is because of the differing paths to the CCC directory. Now
this *is* a pain, because it masks any genuine errors, and it fills up the
apache error_log. 


So, sorry to have rambled on a bit, but does anyone have any suggestions as
to how I can properly fix these problems, or tell me what I'm doing wrong.
Any advice will be very welcome.

Cheers,
-- 
Tony van der Hoff        | mailto:[EMAIL PROTECTED]
Buckinghamshire, England

Reply via email to