PHP  
 PHP_5_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/curl/tests/curl_setopt_basic002.phpt ('curl_setopt basic tests with CURLOPT_STDERR.')

Script

1: <?php
2:
3: $host 
getenv('PHP_CURL_HTTP_REMOTE_SERVER');
4:
5:
// start testing
6:
echo "*** Testing curl_setopt with CURLOPT_STDERR\n";
7:
8:
$temp_file tempnam(sys_get_temp_dir(), 'CURL_STDERR');
9:
10:
$handle fopen($temp_file'w');
11:
12:
$url "{$host}/";
13:
$ch curl_init();
14:
15:
curl_setopt($chCURLOPT_VERBOSE1);
16:
curl_setopt($chCURLOPT_STDERR$handle);
17:
$curl_content curl_exec($ch);
18:
19:
fclose($handle);
20: unset(
$handle);
21:
var_dump(preg_replace('/[\r\n]/'' 'file_get_contents($temp_file)));
22: @
unlink($temp_file);
23:
24:
ob_start(); // start output buffering
25:
$handle fopen($temp_file'w');
26:
curl_setopt($chCURLOPT_URL$url); //set the url we want to use
27:
curl_setopt($chCURLOPT_STDERR$handle);
28:
$data curl_exec($ch);
29:
ob_end_clean();
30:
31:
fclose($handle);
32: unset(
$handle);
33:
var_dump(preg_replace('/[\r\n]/'' 'file_get_contents($temp_file)));
34: @
unlink($temp_file);
35:
36:
curl_close($ch);
37:
38:
?>
39:

Expected

*** Testing curl_setopt with CURLOPT_STDERR
string(%d) "%S"
string(%d) "%S"
* Closing connection #%d

Output

*** Testing curl_setopt with CURLOPT_STDERR
string(14) "* No URL set! "
string(430) "* About to connect() to gcov.php.net port 80 (#0) *   Trying 208.69.122.227... * connected * Connected to gcov.php.net (208.69.122.227) port 80 (#0) > GET /responder/ HTTP/1.1  Host: gcov.php.net  Accept: */*    < HTTP/1.1 403 Forbidden  < Date: Mon, 07 Apr 2014 00:45:42 GMT  < Server: Apache/2.2.15 (CentOS)  < Content-Length: 212  < Connection: close  < Content-Type: text/html; charset=iso-8859-1  <   * Closing connection #0 "

Diff

004- * Closing connection #%d

 

Generated at Tue, 08 Apr 2014 11:59:52 +0000 (9 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.