Edit report at http://bugs.php.net/bug.php?id=52820&edit=1

 ID:                 52820
 Updated by:         cataphr...@php.net
 Reported by:        klawd+phpbugs at kamundo dot de
 Summary:            curl doesn't write to php://temp or /memory
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Sockets related
 Operating System:   Ubuntu
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

Your description and your test script don't match. The first mentions
"php://memory", the script uses "php://temp".



Additionally, you don't specify open modes in the test script.



Seeing the source code, there's a small error in that persistent
resources are not accepted (ZEND_FETCH_RESOURCE2 should have been used),
but it should not cause the problem you're describing.



Please fix the problems with your bug report.


Previous Comments:
------------------------------------------------------------------------
[2010-09-12 02:05:23] klawd+phpbugs at kamundo dot de

Description:
------------
Setting CURLOPT_STDERR to fopen('php://output', 'w') will write curl
debug output.



One would await that setting it to fopen('php://memory', 'w') would
store it in the memory and it would be available after a rewind. That is
not the case, instead, a warning is raised:



Warning: curl_setopt(): supplied argument is not a valid File-Handle
resource in



is php://output a valid file handle resource?



This is very confusing and it should be possible to store the output in
the memory.

Test script:
---------------
$handle=curl_init('http://google.com');

curl_setopt($handle, CURLOPT_STDERR, fopen('php://output'));

curl_exec($handle);

curl_setopt($handle, CURLOPT_STDERR, $output=fopen('php://temp'));

curl_exec($handle);

rewind($output);

var_dump($output);



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52820&edit=1

Reply via email to