|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12901 timeout-option of php_hostconnect seems to be ignored
Submitted: 2001-08-22 11:24 UTC Modified: 2001-09-07 10:04 UTC
From: maddog2k at maddog2k dot nl Assigned:
Status: Closed Package: *Network Functions
PHP Version: 4.0.6 OS: RedHat 6.2 - Linux 2.2.19
Private report: No CVE-ID: None
 [2001-08-22 11:24 UTC] maddog2k at maddog2k dot 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 ? :)))


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-07 10:04 UTC]
Fixed in current CVS.

(AND IT WAS A DUP! :-) )

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Aug 24 00:01:26 2019 UTC