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

curl-and-php

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

From: Philip Espersen <philip_at_thedeejay.dk>
Date: Fri, 7 Sep 2007 00:33:11 +0200

Hi Daniel,

I tried reinstalling c-ares from ports, no good.

My cURL port config (make config) is;

[X] CARES Asynchronous DNS resolution via c-ares
[X] CURL_DEBUG Enable curl diagnostic output
[ ] GNUTLS Use GNU TLS if OPENSSL is OFF
[ ] IPV6 IPv6 support
[X] KERBEROS4 Kerberos 4 authentication
[X] LIBIDN Internationalized Domain Names via libidn
[ ] LIBSSH2 SCP/SFTP support via libssh2
[X] NTLM NTLM authentication
[X] OPENSSL OpenSSL support

None of the above could cause this confligt?

/Philip

-----Oprindelig meddelelse-----
Fra: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] På vegne af Daniel Stenberg
Sendt: 6. september 2007 23:47
Til: curl with PHP
Emne: Re: cURL can't resolve host through Apache/PHP, works with PHP/CLI

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
-- 
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 14058 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: http://www.spamfighter.com/lda
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-07