Bug #12901 Updated: timeout-option of php_hostconnect seems to be ignored

From: Date: Fri, 07 Sep 2001 14:04:54 +0000
Subject: Bug #12901 Updated: timeout-option of php_hostconnect seems to be ignored
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65347@lists.php.net to get a copy of this message
ID: 12901 Updated by: mathieu Reported By: maddog2k@maddog2k.nl Old Status: Open Status: Closed Bug Type: *Network Functions Operating System: RedHat 6.2 - Linux 2.2.19 PHP Version: 4.0.6 New Comment: Fixed in current CVS. (AND IT WAS A DUP! :-) ) Previous Comments: ------------------------------------------------------------------------ [2001-08-22 11:24:47] maddog2k@maddog2k.nl Cause there is no way to set functions that use the fopen_url_wrapper to use non-blocking mode, I wanted to force this in the source code. (yes, I know fsockopen() is there, but I don't have control over the applications of our clients, and there are a lot of them who use this functionality, so I can't simply set allow_url_fopen to 0/False). I adjusted the following in ext/standard/http_fopen_wrapper.c, cause the php_hostconnect function appeared to have this functionality (also noted at the comments above). *socketd = php_hostconnect(resource->host, resource->port, SOCK_STREAM, 10); Default, there's a 0 instead of a 10. However, the timeout still is ignored when I do a remote include from a terrible slow server (it sents no response :)). I tried this with PHP 4.0.5 and 4.0.6. I also tried it with copying the source from main/network.c of 4.0.6, to main/network.c of 4.0.5. It build, but no luck in getting done what it should do IMHO :) I also tried to use the function that fsocken() appears to use, in ext/standard/fsock.c Am I willing something that isn't possible or so ? :))) ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12901&edit=1

« previous php.dev (#65347) next »