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

curl-and-php

Domain resolution problem

From: David Johns <djohns_at_culturejam.tv>
Date: Tue, 12 Feb 2002 15:41:07

Hello,

I've just installed curl 7.9.3 on my RedHat Linux system (Kernel 2.2.19), with OpenSSL 0.9.6c, PHP 4.0.6 and Apache 1.3.23. All seemed to
compile fine - PHP reported curl installed happily and a brief test seemed to work ok.

However, now I've written a proper bit of code to use it (under libcurl in PHP) I'm getting domain resolution problems - it refuses to resolve
https://www.paypal.com (although it seems to have no trouble getting the page on the command line version of curl).

So I did a search through the archives and I see that this one has come up before but being a novice at all this I'm a bit baffled as to the fix.
Below are some config bits that seemed to crop up in the archive which may be relevant - can anyone suggest what's wrong and how to fix
it, bearing in mind I'm no expert at compiling or C or suchlike (I just follow the instructions and hope for the best...)?

$ cat config.log | grep gethostbyname_r
configure:10439: checking for gethostbyname_r
configure:10502: checking if gethostbyname_r takes 3 arguments
configure:10514: conflicting types for `gethostbyname_r'
/usr/include/netdb.h:161: previous declaration of `gethostbyname_r'
gethostbyname_r(const char *, struct hostent *, struct hostent_data *);
gethostbyname_r(NULL, NULL, NULL);
configure:10551: checking if gethostbyname_r with -D_REENTRANT takes 3 arguments

configure:10565: conflicting types for `gethostbyname_r'
/usr/include/netdb.h:161: previous declaration of `gethostbyname_r'
gethostbyname_r(const char *,struct hostent *, struct hostent_data *);
gethostbyname_r(NULL, NULL, NULL);
configure:10606: checking if gethostbyname_r takes 5 arguments
configure:10617: conflicting types for `gethostbyname_r'
/usr/include/netdb.h:161: previous declaration of `gethostbyname_r'
gethostbyname_r(const char *, struct hostent *, char *, int, int *);
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
configure:10654: checking if gethostbyname_r takes 6 arguments
ac_cv_func_gethostbyname_r=yes

$ grep HOSTBY config.h
/* #undef HAVE_GETHOSTBYADDR_R_5 */
/* #undef HAVE_GETHOSTBYADDR_R_7 */
#define HAVE_GETHOSTBYADDR_R_8 1
/* #undef HAVE_GETHOSTBYNAME_R_3 */
/* #undef HAVE_GETHOSTBYNAME_R_5 */
#define HAVE_GETHOSTBYNAME_R_6 1
#define HAVE_GETHOSTBYADDR 1
#define HAVE_GETHOSTBYADDR_R 1
#define HAVE_GETHOSTBYNAME_R 1

Many thanks,

David Johns
culturejam.tv - video and audio optimised for the web
Nudity! Violence! And a microbilling pay-per-view solution!
See it all at http://www.salmondays.tv

e: djohns_at_culturejam.tv
t: +44 (0) 20 8979 7600
f: +44 (0) 20 8979 8140

This message is intended only for the use of the person(s) (the "intended recipient(s)") to whom it is addressed. It may contain information which is privileged and confidential. If you are not the intended recipient, please contact the sender as soon as possible. The views expressed in this communication may not necessarily be the views of Culturejam TV. Any copyright in this message shall remain vested in Culturejam TV and the intended recipient may only copy the same for internal business purposes or as otherwise stated in this message. culturejam limited registered number 04147310
Received on 2002-02-12