Bug 192485 - CGI.pm doesn't work with mod_perl 1.99
CGI.pm doesn't work with mod_perl 1.99
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: perl (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-05-19 20:57 EDT by Jonathan Schatz
Modified: 2008-10-13 09:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-13 09:02:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Schatz 2006-05-19 20:57:14 EDT
Description of problem:

given a perl.conf in /etc/httpd/conf.d/ that has this line in it:

PerlRequire /etc/httpd/conf.d/startup.pl

and a /etc/httpd/conf.d/startup.pl with:

use CGI;

CGI.pm won't compile. it fails with 

Starting httpd: [Fri May 19 17:59:26 2006] [error] Can't locate Apache.pm in
@INC (@INC contains: /var/www/html /var/www/html/mod_perl
/usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4
/usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl /etc/httpd/ /etc/httpd/lib/perl) at
/usr/lib/perl5/5.8.5/CGI.pm line 196.\nCompilation failed in require at
/etc/httpd/conf.d/startup.pl line 16.\nBEGIN failed--compilation aborted at
/etc/httpd/conf.d/startup.pl line 16.\nCompilation failed in require at (eval 2)
line 1.\n
[Fri May 19 17:59:26 2006] [error] Can't load Perl file:
/etc/httpd/conf.d/startup.pl for server celebration.eng.vmware.com:0, exiting...

the actual error is in CGI.pm around line 190:

    $MOD_PERL = 2;
    require Apache2::Response;
    require Apache2::RequestRec;
    require Apache2::RequestUtil;
    require Apache2::RequestIO;
    require APR::Pool;
 } else {
   $MOD_PERL = 1;
    require Apache;

the problem is, redhat's mod_perl is 1.99, so $ENV{MOD_PERL_API_VERSION} is not
2 (this maybe should be fixed in mod_perl instead of here, i'm not sure). so
CGI.pm tries to load Apache.pm (which doesn't exist). if i comment out the if
statement and the rest of the else block (ie, if i don't check the api version
and just use the Apache2::* modules), everything works as expected. 

Version-Release number of selected component (if applicable):
[root@celebration conf.d]$ rpm -q mod_perl perl
Comment 1 Marcela Mašláňová 2008-08-14 09:42:01 EDT
I didn't reproduce at RHEL-4.6. Could you provide more info about version?
Comment 2 Marcela Mašláňová 2008-10-13 09:02:34 EDT
Since there are insufficient details provided in this report for us to investigate the issue further, and we have not received the feedback we requested, we will assume the problem was not reproduceable or has been fixed in a later update for this product.

Users who have experienced this problem are encouraged to upgrade to the latest update release, and if this issue is still reproduceable, please contact the Red Hat Global Support Services page on our website for technical support options: https://www.redhat.com/support

Note You need to log in before you can comment on or make changes to this bug.