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);
Patches
Add a Patch
Pull Requests
Add a Pull Request
History