Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 11852
Status: resolved
Priority: 0/
Queue: CGI

Owner: MARKSTOS [...]
Requestors: blackdown [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Important Bug in mod_perl version detection
Download (untitled) / with headers
text/plain 2.3k
Original Code: # Turn on special checking for Doug MacEachern's modperl my $MOD_PERL = 0; if (exists $ENV{MOD_PERL}) { eval "require mod_perl"; if (defined $mod_perl::VERSION) { my $float = $mod_perl::VERSION; $float = ~ s/^.+?([\d.]+).+$/$1/; if ($float >= 1.99) { $MOD_PERL = 2; require Apache::RequestUtil; eval "require APR::Table"; # Changing APIs? I hope not. } else { $MOD_PERL = 1; require Apache; } } } Error: root@hosting [~]# /etc/init.d/httpd configtest Use of uninitialized value in substitution (s///) at /usr/lib/perl5/5.8.6/CGI/ line 29. [Sat Mar 12 14:46:37 2005] [error] Can't locate Apache/ in @INC (@INC contains: /usr/local/rt3/local/lib /usr/local/rt3/lib /usr/lib/perl5/5.8.6/i686-linux-thread-multi /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /usr/lib/perl5/5.8.6/CGI/ line 32.\nCompilation failed in require at /usr/local/rt3/bin/ line 103.\nBEGIN failed--compilation aborted at /usr/local/rt3/bin/ line 103.\nCompilation failed in require at (eval 6) line 1.\n Syntax error on line 1169 of /usr/local/apache/conf/httpd.conf: Can't locate Apache/ in @INC (@INC contains: /usr/local/rt3/local/lib /usr/local/rt3/lib /usr/lib/perl5/5.8.6/i686-linux-thread-multi /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /usr/lib/perl5/5.8.6/CGI/ line 32. Compilation failed in require at /usr/local/rt3/bin/ line 103. BEGIN failed--compilation aborted at /usr/local/rt3/bin/ line 103. Compilation failed in require at (eval 6) line 1. My Solution: Comment Line 29 /usr/lib/perl5/5.8.6/CGI/ my $float = $mod_perl::VERSION; # $float = ~ s/^.+?([\d.]+).+$/$1/; #comment by bug if ($float >= 1.99) { Hay put a test print under my $float = $mod_perl::VERSION; and get 1.29 Code: my $float = $mod_perl::VERSION; print $float; # Test: Check $float Output: 1.29 This bug is reproduce in Perl 5.8.6 and older with CGI::Cookie v1.24 and CGI v3.0.6
Download (untitled) / with headers
text/plain 255b
The OS is: Fedora Core 1 with legacy yum and cPanel installed. Kernel: Linux XXXX 2.4.22-1.2199.4.legacy.nptlsmp #1 SMP Sun Feb 20 18:07:59 EST 2005 i686 i686 i386 GNU/Linux Perl 5.8.1 installed by cPanel Installation Perl 5.8.6 installed by me with Cpan
Download (untitled) / with headers
text/plain 209b
This change is really weird and breaks mod_perl version detection. - if ($mod_perl::VERSION >= 1.99) { + my $float = $mod_perl::VERSION; + $float = ~ s/^.+?([\d.]+).+$/$1/; + if ($float >= 1.99) {
Ok, this is correct for my server
From: PURDY [...]
Download (untitled) / with headers
text/plain 579b
I was having a problem on my mp2/apache2 server: [Wed Sep 06 15:59:23 2006] [error] [client] Error executing run mode 'personal_info': Can't locate Apache/ in @INC (@INC contains: /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 ... ) at /usr/share/perl/5.8/CGI/ line 30.\nCompilation failed in require at (eval 106) line 6.\n at -e line 0\n, referer: And I believe somehow related, but also, instead of this: Show quoted text
> require Apache::RequestUtil;
It should be this: Show quoted text
> require Apache2::RequestUtil;
Download (untitled) / with headers
text/plain 158b
Looks like the mod_perl detection is completely different in 3.43. I'm marking this as resolved for now, Please re-open if you still see an issue. Mark

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to