Re: Re: Apache (php5/fcgi) can't resolve hostnames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 15, 2009 at 10:31:52AM -0700, Aaron Turner wrote:
> On Tue, Apr 14, 2009 at 11:34 PM, Krist van Besien
> <krist.vanbesien@xxxxxxxxx> wrote:
> > On Tue, Apr 14, 2009 at 5:32 PM, Aaron Turner <synfinatic@xxxxxxxxx> wrote:
> >> Nobody has any ideas???
> >>
> >> On Sat, Apr 11, 2009 at 3:31 PM, Aaron Turner <synfinatic@xxxxxxxxx> wrote:
> >>> At first I thought this was a problem with my python/fastcgi config,
> >>> but now I've noticed that php5 apps like Wordpress can't resolve hosts
> >>> either.  Resolving hosts works just fine on the command line via the
> >>> "host" command though so it's not like DNS is broken.  Hence it seems
> >>> that the common link is apache.  Anyone have any suggestions on how to
> >>> debug this?
> >>>
> >>> OS X 10.5.6
> >>> Apache 2.2.11 (via MacPorts)
> >
> > We have lots of ideas, but you should provide us with more information
> > about your problem before we can help you.
> >
> > You say that "php5.apps can't resolve hosts". What do you mean by
> > that? What is it that you are doing, what are you expecting, and what
> > are you getting in stead of what you expect?
> 
> I mean that PHP/Python code running under Apache is attempting to
> connect to other hosts and in doing so is requiring a DNS hostname
> lookup to resolve the IP address.  This lookup is failing, which
> prevents the connection from succeeding.
> 
> For example, Wordpress w/ the Aksimet plugin tries to resolve
> <mykey>.api.akismet.com.  This works just fine from the command line,
> but returns an error "Unable to resolve host".   Trac (running under
> fastcgi/python) is having issues resolving hosts for re-captcha.
> Again, this works just fine from a shell.
> 
> It's not just anti-spam things either.  Wordpress couldn't resolve
> twitter.com in order to pull an RSS feed.  However, once I added an
> entry for twitter.com to my /etc/hosts, the problem went away.  This
> was my smoking gun.
> 
> Another PHP application (Gallery) is also having dns resolving issues
> for Akismet (same service, different codebase).
> 
> For a long time I thought this was just a PHP issue and then I noticed
> Trac (which isn't PHP) was having the same issue.  The only
> commonality is that both run under Apache.  Other services (postfix
> for example) on the same box have no issue resolving hosts.
> 
> Of course, maybe they're two totally unrelated issues, but it seems
> like too big of a coincidence to ignore.

Do you have more than one ethernet-interface?
Perhaps your Apache is bound to an interface that has no connections
to the outside?

Paul
-- 


Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux