cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: cURL can't resolve host through Apache/PHP, works with PHP/CLI

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Sep 2007 23:46:47 +0200 (CEST)

On Thu, 6 Sep 2007, Philip Espersen wrote:

> I'm running my own webserver with FreeBSD 6.1, Apache 2.2.4, PHP 5.2.3 and
> cURL, here's info about cURL saxet from phpinfo().
>
> libcurl/7.16.3 OpenSSL/0.9.7e zlib/1.2.2 c-ares/1.4.0 libidn/0.6.14

[...]

> gethostbyaddr:x1-6-00-13-d5-47-f8-70.k681.webspeed.dk
> gethostbyname:62.242.228.11
> 6Could not resolve host: www.bipbip.dk (Error reading file)

libcurl uses c-ares and not the "plain" gethostbyname() function which
explains how they can end up differently.

Possibly it is a c-ares bug/problem, or possibly there's something that c-ares
wants/needs that it can't get/use when run from Apache.

Since it works outside of Apache, I have the gut feeling it is more likely to
be something related to how it is invoked within it.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-06