#36072 [NEW]: stream_set_connection_timeout()

From: Date: Wed, 18 Jan 2006 20:16:56 +0000
Subject: #36072 [NEW]: stream_set_connection_timeout()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92149@lists.php.net to get a copy of this message
From: ceo at l-i-e dot com Operating system: All PHP version: 5.1.2 PHP Bug Type: Feature/Change Request Bug description: stream_set_connection_timeout() Description: ------------ I love the simplicity of fopen() that takes most URLs / files / whatever and does what I want. Do whatever it takes to start sending me the data. I NEED the ability to set the time-out for the opening, as well as the time-out after the stream has opened. I'm stuck with duplicating whatever code is down in fopen() in my own PHP code to detect and initiate protocol specific minutia because fopen() has no user-configurable timeout, but fsockopen doesn't do all that. $parts = parse_url($url); extract($parts); switch($scheme){ case 'http': fputs("GET $path HTTP/1.0\n"); fputs("Host: $host\n"); break; case 'ftp': fputs("GET $path\n"); break; . . . } I REALLY don't want to re-invent the wheel here, when I know that code is down in the guts of fopen() A function stream_set_connection_timeout() to let me tell PHP how long fopen() should wait would make life way more better for many users, I believe. Expected result: ---------------- The PHP Dev Team is going to add this function because YOU ROCK! :-) -- Edit bug report at http://bugs.php.net/?id=36072&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36072&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36072&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36072&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36072&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36072&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36072&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36072&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36072&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36072&r=support Expected behavior: http://bugs.php.net/fix.php?id=36072&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36072&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36072&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36072&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36072&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36072&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36072&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36072&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36072&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36072&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36072&r=mysqlcfg

« previous php.bugs (#92149) next »