ID: 8856
Updated by: sniper
Old-Status: Open
Status: Feedback
Bug Type: Network related
Assigned To: 

Works for me just fine with latest CVS. Please try the 
latest CVS snapshot from


Previous Comments:

[2001-01-23 12:28:11] [EMAIL PROTECTED]
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:
   echo (gethostbyname (""));


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 

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 
memcpy (&a.s_addr, *(host_struct->h_addr_list), sizeof (a.s_addr));

If you need more information please let me know.

Niels Leenheer


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to