|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-03-10 16:12 UTC] sniper@php.net
[2001-03-10 16:30 UTC] derick@php.net
[2001-03-10 17:13 UTC] niels at creatype dot nl
[2001-03-10 20:21 UTC] venaas@php.net
[2001-07-21 21:01 UTC] andy@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 09 09:00:02 2026 UTC |
The gethostbyname doesn't seem to work on some of the systems I use. The problem only occurs on some machines, others work fine. The problem only occurs on 4.0x, but not on 3.0x on the same machine. All machines use the same build of php4. For example: <PHP echo (gethostbyname ("sql-1.vuurwerk.nl")); ?> Result: sql-1.vuurwerk.nl The bug? also affects functions like mysql_connect. I am unable to connect to a sql server unless I replace the hostname with an ip adress. I've traced the problem back to sockets.c, line 817: a.s_addr = (int) (*(host_struct->h_addr_list[0])); If I replace the code above with the equivalent code used in php3 the problem is solved: memcpy (&a.s_addr, *(host_struct->h_addr_list), sizeof (a.s_addr)); If you need more information please let me know. Niels Leenheer niels@creatype.nl