Hi,

It returns

Reading Makefile.PL args from @ARGV
   MP_AP_PREFIX = /usr/local/apache2
   MP_USE_DSO = 1
Configuring Apache/2.0.48 mod_perl/1.99_11 Perl/v5.8.2
!!! default servername localhost
Usage: Socket::inet_ntoa(ip_address_sv) at
Apache-Test/lib/Apache/TestConfig.pm line 593.
!!! default servername localhost

so it looks like it does want the entry in /etc/hosts.

TBH I dont know why it is not in there.

Adam

----- Original Message ----- 
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Adam Gent" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 09, 2003 10:44 PM
Subject: Re: Problems installing mod_perl


> Adam Gent wrote:
> > Hi,
> >
> > I am trying to install mod_perl but can not get past the makefile stage.
> >
> > I am using
> >
> > perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2 MP_USE_DSO=1
> >
> > and get this output
> >
> > Reading Makefile.PL args from @ARGV
> >    MP_AP_PREFIX = /usr/local/apache2
> >    MP_USE_DSO = 1
> > Configuring Apache/2.0.48 mod_perl/1.99_11 Perl/v5.8.2
> > Usage: Socket::inet_ntoa(ip_address_sv) at
> > Apache-Test/lib/Apache/TestConfig.pm line 592.
> >
> > Has anybody seen this problem before.
>
> It fails here:
>
> sub our_remote_addr {
>      my $self = shift;
>      my $name = $self->default_servername;
>      $remote_addr ||= Socket::inet_ntoa((gethostbyname($name))[-1]);
> }
>
> I suppose (gethostbyname($name))[-1] returns undef and we assume that
it'll
> always work.
>
> Can you insert a debug print:
>
> Index: Apache-Test/lib/Apache/TestConfig.pm
> ===================================================================
> RCS file:
> /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
> retrieving revision 1.187
> diff -u -r1.187 TestConfig.pm
> --- Apache-Test/lib/Apache/TestConfig.pm        24 Nov 2003 23:31:31 -0000
>   1.187
> +++ Apache-Test/lib/Apache/TestConfig.pm        9 Dec 2003 22:35:11 -0000
> @@ -589,6 +589,7 @@
>   sub our_remote_addr {
>       my $self = shift;
>       my $name = $self->default_servername;
> +    error "default servername $name";
>       $remote_addr ||= Socket::inet_ntoa((gethostbyname($name))[-1]);
>   }
>
> and show us what do you get?
>
> Most likely the name comes from:
>
> sub default_localhost {
>      my $localhost_addr = pack('C4', 127, 0, 0, 1);
>      gethostbyaddr($localhost_addr, Socket::AF_INET()) || 'localhost';
> }
>
> which probably returns 'localhost' and then it fails to resolve it, if
your
> /etc/hosts doesn't include:
>
> 127.0.0.1               localhost.localdomain   localhost
>
> I'm pretty sure that once you add this line it'll work. Though let's debug
the
> issue so we can croak with a proper suggestion if that happens to others.
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
>
> -- 
> Reporting bugs: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.548 / Virus Database: 341 - Release Date: 06/12/2003


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to