ID: 7880 Updated by: jason Reported By: [EMAIL PROTECTED] Old-Status: Assigned Status: Closed Bug Type: Network related Operating system: PHP Version: 4.0.3pl1 Assigned To: [EMAIL PROTECTED] Comments: Never able to reproduce, try 4.0.6 and reopen if still a problem. Previous Comments: --------------------------------------------------------------------------- [2001-01-22 22:19:45] [EMAIL PROTECTED] reclassifying. --------------------------------------------------------------------------- [2000-12-30 20:52:24] [EMAIL PROTECTED] Ok - I seem to have tracked this down. I added debug statements throughout PHP to see exactly where it was failing, and found that it is happening in: php_network_getaddresses in main/network.c. Basically, in php_fopen_url_wrap_http in ext/standard/http_fopen_wrapper.c, I modified the function to let me know where it was bailing: *socketd = php_hostconnect(resource->host, resource->port, SOCK_STREAM, 0); if (*socketd == -1) { php_error(E_WARNING, "php_hostconnect failed"); SOCK_FCLOSE(*socketd); *socketd = 0; free_url(resource); return NULL; } It does get to that php_error message, and so after looking through php_hostconnect, I found that our problem was a failed lookup in php_network_getaddresses. Here is my slightly modified code that prints out an error message when getaddrinfo fails: static int php_network_getaddresses(const char *host, struct sockaddr ***sal) { int err; struct sockaddr **sap; if (host != NULL) { #ifdef HAVE_GETADDRINFO struct addrinfo hints, *res, *sai; int n; memset( &hints, ' -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]