Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed, sed: -e expression #1, char 1: unterminated address regex, procmail + change subject, w2ksp4.exe download

Links

XODOX
Impressum

#1: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 20:12:42 by Thomas Hilbig

I had an old problem with a backup server that I am
trying to fix while updating perl, Apache, and
mod_perl2. My CGI scripts worked under Apache/MP2,
however, everytime I tried to run them from in a shell
I got "Can't locate Apache.pm". This was even though
I had installed Bundle::Apache2 and CGI was 3.16.

I tried to reinstall CGI, Bundle::Apache2, but still
got the error. Finally, I renamed the /usr/lib/perl5
directory and am trying to reinstall Perl 5.8.8 from
source tar. However, in the "make test" section I am
still getting the same errors on all CGI modules:
"Can't locate Apache.pm".

Any suggestions??
Tom

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Report this message

#2: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 20:16:34 by Tyler MacDonald

Thomas Hilbig <thilbig@yahoo.com> wrote:
> I tried to reinstall CGI, Bundle::Apache2, but still
> got the error. Finally, I renamed the /usr/lib/perl5
> directory and am trying to reinstall Perl 5.8.8 from
> source tar. However, in the "make test" section I am
> still getting the same errors on all CGI modules:
> "Can't locate Apache.pm".

Ack! Before you drive yourself nuts with this, read this page:

http://perl.apache.org/docs/2.0/rename.html

Cheers,
Tyler

Report this message

#3: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 20:38:34 by Thomas Hilbig

--- Tyler MacDonald <tyler@yi.org> wrote:

> Thomas Hilbig <thilbig@yahoo.com> wrote:
> > I tried to reinstall CGI, Bundle::Apache2, but
> still
> > got the error. Finally, I renamed the
> /usr/lib/perl5
> > directory and am trying to reinstall Perl 5.8.8
> from
> > source tar. However, in the "make test" section I
> am
> > still getting the same errors on all CGI modules:
> > "Can't locate Apache.pm".
>
> Ack! Before you drive yourself nuts with this, read
> this page:
>
> http://perl.apache.org/docs/2.0/rename.html
>
> Cheers,
> Tyler
>

I shouldn't have to clean up the perl tree of old
Apache*.pm stuff as I blew away the whole tree by
renaming it. Now, it's the perl 5.8.8 install (make
test) that is complaining about the Apache.pm.

I did follow the instructions in the link (some months
ago) when migrating from mp 0.99 to mp2, and lived
with the command line problem. However, as I am
trying to reinstall everything (perl included) I don't
know why am seeing this problem at all. Any
suggestions?


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Report this message

#4: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 20:43:33 by Tyler MacDonald

Thomas Hilbig <thilbig@yahoo.com> wrote:
> > Ack! Before you drive yourself nuts with this, read
> > this page:
> >
> > http://perl.apache.org/docs/2.0/rename.html
> I shouldn't have to clean up the perl tree of old
> Apache*.pm stuff as I blew away the whole tree by
> renaming it. Now, it's the perl 5.8.8 install (make
> test) that is complaining about the Apache.pm.
>
> I did follow the instructions in the link (some months
> ago) when migrating from mp 0.99 to mp2, and lived
> with the command line problem. However, as I am
> trying to reinstall everything (perl included) I don't
> know why am seeing this problem at all. Any
> suggestions?

Thomas,

The problem isn't with your /lib/ tree at all, it has to be
with your code. One of your perl modules, or a module you are using, is
trying to "use Apache", when it shouldbe "use Apache2::RequestRec" or some
such thing.

- Tyler

Report this message

#5: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 21:33:51 by Thomas Hilbig

> > I did follow the instructions in the link (some
> months
> > ago) when migrating from mp 0.99 to mp2, and lived
> > with the command line problem. However, as I am
> > trying to reinstall everything (perl included) I
> don't
> > know why am seeing this problem at all. Any
> > suggestions?
>
> Thomas,
>
> The problem isn't with your /lib/ tree at all, it
> has to be
> with your code. One of your perl modules, or a
> module you are using, is
> trying to "use Apache", when it shouldbe "use
> Apache2::RequestRec" or some
> such thing.
>
> - Tyler
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.

Thanks for your help,
Tom

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Report this message

#6: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 21:35:32 by Tyler MacDonald

Thomas Hilbig <thilbig@yahoo.com> 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

Report this message

#7: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 22:15:05 by Thomas Hilbig

--- Tyler MacDonald <tylerm@ca.sophos.com> wrote:

> Thomas Hilbig <thilbig@yahoo.com> 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

Report this message

#8: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-05 22:32:08 by Thomas Schindl

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 <thilbig@yahoo.com>
> 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 <tylerm@ca.sophos.com> wrote:
>
> > Thomas Hilbig <thilbig@yahoo.com> 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

Report this message

#9: Re: Reinstall gets Can"t locate Apache.pm

Posted on 2006-05-07 16:11:20 by Thomas Hilbig

--- Thomas Schindl <tomAtLinux@gmx.at> wrote:

> 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
>
The scripts use CGI.pm and haven't been converted to
MOD_PERL handlers -- yet. Since CGI.pm allows you to
test scripts via the command line, it makes sense to
do so during the initial development of complex
scripts. I guess MP doesn't support the same command
line emulation, so I agree that it doesn't make sense
to have the two environment variables defined outside
of the Apache environment.

Tom

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Report this message