ID: 30057
Updated by: [EMAIL PROTECTED]
Reported By: neon at neon-line dot net
-Status: Open
+Status: Feedback
Bug Type: Sockets related
Operating System: FreeBSD 4.10
PHP Version: 5.0.1
New Comment:
Please try manually compiling this (slightly altered code from
configure.in), running it, and pasting the output here in this bug
report; thanks!
1/ Copy the code into v6test.c
2/ cc -o v6test v6test.c
3/ ./v6test
#include <netdb.h>
#include <sys/types.h>
int main(void) {
struct addrinfo *ai, *pai, hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
if (getaddrinfo("127.0.0.1", NULL, &hints, &ai) < 0) {
printf("FAIL-1\n");
exit(1);
}
if (ai == NULL) {
printf("FAIL-2\n");
exit(1);
}
pai = ai;
while (pai) {
if (pai->ai_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
printf("FAIL-3\n");
exit(1);
}
if (pai->ai_addr->sa_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
printf("FAIL-4\n");
exit(1);
}
pai = pai->ai_next;
}
freeaddrinfo(ai);
printf("OK!\n");
exit(0);
}
Previous Comments:
------------------------------------------------------------------------
[2004-09-11 19:05:49] neon at neon-line dot net
http://www.neon-line.net/dev/config.log
There's not much information about this issue, at least I couldn't
find. And the code in configure.in that checks for getaddrinfo seems
more or less like glue, but there's propably a reason for it to be that
way :)
------------------------------------------------------------------------
[2004-09-11 18:45:42] [EMAIL PROTECTED]
Scratch that, it'll definately show undefined, the question is why.
Can you just post your config.log file somewhere? Or email it to me?
------------------------------------------------------------------------
[2004-09-11 18:45:29] neon at neon-line dot net
It was:
/* #undef HAVE_GETADDRINFO */
After I added
#define HAVE_GETADDRINFO 1
and removed
#define HAVE_GETHOSTBYNAME2 1
Everything worked just fine with those modifications, so after all it
is a bug in the configure script.
------------------------------------------------------------------------
[2004-09-11 18:35:52] [EMAIL PROTECTED]
grep HAVE_GETADDRINFO main/php_config.h
------------------------------------------------------------------------
[2004-09-11 11:50:50] neon at neon-line dot net
Configure command used:
./configure --disable-all --enable-ipv6 \ --with-apxs2=/path/to/apxs2
grep "IPv6" config.log
configure:16103: checking for IPv6 support
configure:17764: checking whether to enable IPv6 support
phpinfo:
IPv6 Support => enabled
I don't see much more that I could have done in order to enable the
IPv6 support.
Maybe the --disable-all statement causes this problem?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30057
--
Edit this bug report at http://bugs.php.net/?id=30057&edit=1