Click here to get back home

CPAN conflict issue - CGI.pm vs ModPerl::Registry

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
CPAN conflict issue - CGI.pm vs ModPerl::Registry Gabriel 09-25-2006
Posted by Gabriel on September 25, 2006, 12:42 pm
Please log in for more thread options


Recently, I installed ModPerl::Registry on a Fedora Core Server, as
regular ModPerl didn't want to install, due to some janky Fedora Core
reason.
I wrote some CGI scripts, and all was well. Peace reigned, and my perl
scripts ran happily in the meadows, alongside unicorns and fairies.

Then, one day, for some foolish reason, I went to install CGI.pm on a
friday evening. The install went well, and I went home.
On monday morning, when I went to run some CGI scripts, they had
broken! (oh noes!)
A close inspection (or a `tail -1 /var/log/httpd/error_log` , actually)
revealed the following...

<ERROR_LOG>
Can't locate Apache.pm in @INC (@INC contains: ...
</TRUNCATED ERROR_LOG>

Now, I have no idea why installing CGI.pm has broken my scripts. Is
there a way of uninstalling a module, and, more importantly, would that
be likely to fix it?

My first thought upon looking at the error_log error, was to install
Apache.pm, but that only results in the following error during 'make
test'...

<ERROR>
/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t &
/bin/sh: /httpd: No such file or directory
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...............not ok
server failed to start! (please examine t/logs/error_log) at t/TEST
line 95.
make: *** [run_tests] Error 111
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
</ERROR>

Is 'httpd' a utility I need to install in order to install Apache.pm?


Aside from CPAN, and Apache.pm failing to install (probably due to some
FC oddity), what I don't understand is how installing CGI.pm managed to
break my existing install which was using ModPerl::Registry. I mean, I
didn't change any of my code, nor did I change my httpd.conf file...
<HTTPD.CONF>
PerlModule ModPerl::Registry
<Directory "/home/media/mod_perl/">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
#PerlOptions -GlobalRequest
Options +ExecCGI +Indexes
</Directory>
</HTTPD.CONF>

The only thing I can think of is CGI.pm (3.23) broke something with the
ModPerl::Registry working...

So, is there a way of uninstalling a module, and, if so, would that be
likely to repair my problem?


Posted by Brian McCauley on September 28, 2006, 4:52 pm
Please log in for more thread options



Gabriel wrote:
> Recently, I installed ModPerl::Registry on a Fedora Core Server, as
> regular ModPerl didn't want to install, due to some janky Fedora Core
> reason.

What do you mean by "regular ModPerl"?

What version of Apache and what version of mod_perl are you running?

IIRC ModPerl::Registry is part of mod_perl2 (which runs with Apache 2)

>
> <ERROR_LOG>
> Can't locate Apache.pm in @INC (@INC contains: ...
> </TRUNCATED ERROR_LOG>

Well it would help to know what line was generating that error.

> Now, I have no idea why installing CGI.pm has broken my scripts. Is
> there a way of uninstalling a module,

No. No backups of the overwritten files are kept.

>and, more importantly, would that be likely to fix it?

Uninstalling the CGI.pm you installed and putting back the version that
was there previously probably would fix it.

> My first thought upon looking at the error_log error, was to install
> Apache.pm, but that only results in the following error during 'make
> test'...
>
> <ERROR>
> /httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t &
> /bin/sh: /httpd: No such file or directory
> httpd listening on port 8529
> will write error_log to: t/logs/error_log
> letting apache warm up...\c
> done
> /usr/bin/perl t/TEST 0
> still waiting for server to warm up...............not ok
> server failed to start! (please examine t/logs/error_log) at t/TEST
> line 95.
> make: *** [run_tests] Error 111
> /usr/bin/make test -- NOT OK
> Running make install
> make test had returned bad status, won't install without force
> </ERROR>
>
> Is 'httpd' a utility I need to install in order to install Apache.pm?

Yes, httpd is Apache. You can't install Apache.pm (aka mod_perl)
without Apache installed. However at various stages thoughout the
evolution of mod_perl there where some fairly major renamings of the
Perl modules that comprise mod_perl.

Also CGI.pm interacts rather closely with mod_perl.

You really need to be sure that your versions of Apache, mod_perl and
CGI.pm are all interoperable versions.

> Aside from CPAN, and Apache.pm failing to install (probably due to some
> FC oddity), what I don't understand is how installing CGI.pm managed to
> break my existing install which was using ModPerl::Registry. I mean, I
> didn't change any of my code,

Did your code call CGI.pm ?


Similar ThreadsPosted
CGI.pm and ModPerl::Registry December 21, 2007, 11:20 pm
Mod_perl conflict with PHP on HTTP_REFERER variable November 16, 2005, 6:04 pm
modperl and apache handlers December 28, 2004, 5:38 am
How to use Registry functions January 30, 2006, 8:47 am
perl : Importing registry keys February 3, 2005, 11:34 am
Windows Registry manipulation using Unix April 29, 2005, 11:46 am
Module to use for win32 registry access? April 4, 2007, 8:32 pm
debugging issue with Net::FTP January 1, 2005, 2:36 pm
net::telnet pm issue February 9, 2007, 3:33 pm
Possible Issue with HTML::TreeBuilder? July 5, 2005, 6:49 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap