Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31691 - CGI-3.00 is overshadowed by CGI.pm installed with Perl
Summary: CGI-3.00 is overshadowed by CGI.pm installed with Perl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-21 10:46 UTC by Andrew Gaffney (RETIRED)
Modified: 2003-12-22 16:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaffney (RETIRED) gentoo-dev 2003-10-21 10:46:56 UTC
When you install mod_perl-1.99.09, it required CGI-3.00. The problem is that it is installed as /usr/lib/perl5/vendor_perl/5.8.1/CGI.pm which I believe gets overshadowed by the original CGI.pm in /usr/lib/perl5/5.8.1/CGI.pm. This then leads to error in the Apache log close to "Cannot find module Apache.pm....." when you try to run a regular CGI script under mod_perl using ModPerl::Registry or ModPerl::PerlRun because its using the old CGI.pm which isn't fully compatible with mod_perl2.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2003-10-21 13:16:23 UTC
Additional info:

The box that I'm having this trouble on is ACCEPT_KEYWORDS="x86". It is running
Apache 2.0.47 and Perl 5.8.0-r12. I installed mod_perl-1.99.09 on this box
to go
along with Apache 2. I get this in my /var/log/apache2/error_log:

[Tue Oct 21 15:10:42 2003] [error] 18133: ModPerl::Registry: Can't locate
Apache.pm in @INC (@INC contains: /home/httpd/perl /usr/lib/perl5/vendor_perl/5.8.0/i686-linux/Apache2
/usr/lib/perl5/5.8.0/i686-linux /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i686-linux
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i686-linux
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . /etc/apache2/
/etc/apache2/lib/perl) at /usr/lib/perl5/5.8.0/CGI.pm line 161.

On my personal box that's running ~x86, I have Apache 2.0.47-r1, Perl 5.8.1-r2,
and mod_perl-1.99.10. I don't have this problem at all. The Apache configs
are almost identical except that in 2.0.47-r1 the docroot is changed to /var/www/localhost
from /home/httpd in 2.0.47 and below.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2003-10-21 13:19:42 UTC
Even more additional info:

If I rename /usr/lib/perl5/5.8.0/CGI.pm to CGI.pm.bak, mod_perl uses CGI-3.00
and the problem disappears.
Comment 3 Robert Coie (RETIRED) gentoo-dev 2003-10-22 11:46:48 UTC
I'm confused between the 5.8.1s and the 5.8.0s.  What I can tell you is this:
vendor_perl overrides things in the perl core.  This is done on purpose in
the
perl ebuild, and has been that way since 5.8.0-r12.  So the original description
you are worried about should not be happening.  If, however, CGI is going
into
the 5.8.1 directories, but running against 5.8.0, of course it won't be found.
I don't see how this could happen in a normal situation, however.  Does this
give you anything more to go on?
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2003-10-22 12:56:43 UTC
Sorry for the confusion. I had been comparing my x86 and ~x86 boxes. The
one I was having the trouble on was 5.8.0 and the directories should have
been also. I don't seem to have this problem with perl-5.8.1. Although, I
think its because perl-5.8.1's copy of CGI.pm is identical to the one in
CGI-3.00.
Comment 5 Robert Coie (RETIRED) gentoo-dev 2003-12-22 16:29:29 UTC
I think the 5.8.0 box may have had a libperl without the @INC directories moved
around.  Upgrading libperl should solve it.