Why do you have set MOD_PERL in the environment when running on the command line? Whether it's Apache or Apache2 doesn't matter it doesn't make sense to run modules which rely on apache-API from the commandline does it?
Tom > --- Ursprüngliche Nachricht --- > Von: Thomas Hilbig <[EMAIL PROTECTED]> > An: mod_perl list <modperl@perl.apache.org> > Betreff: Re: Reinstall gets Can't locate Apache.pm > Datum: Fri, 5 May 2006 13:15:05 -0700 (PDT) > > > > --- Tyler MacDonald <[EMAIL PROTECTED]> wrote: > > > Thomas Hilbig <[EMAIL PROTECTED]> wrote: > > > I was getting the error even from running perl > > > interactively > > > linux>perl > > > use CGI ; > > > Can't locate Apache.pm in @INC > > > > > > I think the problem may be that I am simply > > missing > > > the MOD_PERL_API_VERSION environment variable in > > my > > > shell environment. I had MOD_PERL set in my shell > > > environment (from when??), but not the other. > > > > > > Hopefully, I haven't butchered my Perl install > > beyond > > > repair. > > > > Weird! Are you running the latest version of CGI? > > If not, that could > > be the problem, CGI had to be updated to support > > mod_perl2. > > > > Cheers, > > Tyler > > > Originally I was using CGI 3.16, but the 3.20 has the > same check: > > if (exists $ENV{MOD_PERL}) { > # mod_perl handlers may run system() on scripts > using CGI.pm; > # Make sure so we don't get fooled by inherited > $ENV{MOD_PERL} > if (exists $ENV{MOD_PERL_API_VERSION} && > $ENV{MOD_PERL_API_VERSION} == 2) { > $MOD_PERL = 2; > require Apache2::Response; > require Apache2::RequestRec; > require Apache2::RequestUtil; > require Apache2::RequestIO; > require APR::Pool; > } else { > $MOD_PERL = 1; > require Apache; > } > } > > Having the MOD_PERL environment but not having > MOD_PERL_API_VERSION causes grief. However, the > instructions do say it is required so it's my fault > for not catching it earlier. > > Tom > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail