Al wrote: > I can't use a bad URL because the fopen fails. Sorry, that was silly of me. > I assumed from reading the manual that if I started stream_set_timeout() > it > would monitor the stream and do something when it reached the timeout, > either > truncate my data stream or show up as [timed_out] => true. It doesn't > appear to > do anything. > > I can set the timeout down to microseconds and/or read a 4mb remote file > and > nothing appears to happen. The 4mb file is read fully and [timed_out] => > never > changes for small or large files, microseconds or 600 seconds. > > I did a function_exists() on stream_set_timeout() and it's fine and I have > all > errors on and nothing unusual shows up. > > php version is 4.3.10 But the timeout ONLY happens when the remote server *FAILS* to deliver the data in the time-frame specified. File size is irrelevant, if the connection is good and solid, and the remote server is not busy/interrupted. Setting it to microseconds, and trying to get something over a slow connection would maybe (MAYBE) be a valid test. Or, if you really think a large file will cause the time-out, then use a LARGE file. 4Mb is not a large file. 400Mb is a large file. :-) Or, if you control a development server, connect to your own server and start a big download, and UNPLUG the ethernet cable from the "remote" server half-way through download. If it still doesn't crap out, then there's something wrong. Actually, it would be very magical, wonderful, and nice if you could make it still work with the cable unplugged :-) My point is that you haven't tested anything if the data comes through all right -- Everything "works" is not an indication of a problem. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php