Just to keep the list in synch with the irc discussion. I pointed out that this is only half of the fix. The refcount still prevents fclose from flushing the data, so if you do:
$url = 'http://slowgeek.com/test.xml'; $cfile = 'out.xml'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp = fopen($cfile,'w')); $status = curl_exec($ch); fclose($fp); $data = file_get_contents($cfile); var_dump($data); // 0 bytes here curl_close($ch); $data = file_get_contents($cfile); var_dump($data); // full contents here I still think we need to look at doing a flush on an fclose which doesn't reach the stream destructor due to refcount issues. Can anybody think of any side-effects of a flush on a stream close? -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
