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

Test Failure Report for ext/curl/tests/bug48203.phpt ('Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)')

Script

1: <?php
2:
include 'server.inc';
3:
$fp fopen(__DIR__ '/bug48203.tmp''w');
4:
5:
$ch curl_init();
6:
7:
curl_setopt($chCURLOPT_VERBOSE1);
8:
curl_setopt($chCURLOPT_STDERR$fp);
9:
curl_setopt($chCURLOPT_URLcurl_cli_server_start());
10:
11:
fclose($fp); // <-- premature close of $fp caused a crash!
12:
13:
curl_exec($ch);
14:
curl_close($ch);
15:
16: echo 
"Ok\n";
17:
18:
?>
19:

Expected

Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
%A
Hello World!
Hello World!* Closing connection 0
Ok

Output

Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in /var/php_gcov/PHP_HEAD/ext/curl/tests/bug48203.php on line 13
* 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 301 Moved Permanently
< Date: Sun, 17 Mar 2019 05:56:26 GMT
< Server: Apache/2.2.15 (CentOS)
< Location: http://gcov.php.net/responder/
< Content-Length: 238
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
< 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://gcov.php.net/responder/">here</a>.</p>
</body></html>
* Closing connection #0
Ok

Diff

003+ *   Trying 208.69.122.227... * connected
004+ * Connected to gcov.php.net (208.69.122.227) port 80 (#0)
005+ > GET /responder HTTP/1.1
003- Hello World!
004- Hello World!* Closing connection 0
005- Ok
006+ Host: gcov.php.net
007+ Accept: */*
008+ 
009+ < HTTP/1.1 301 Moved Permanently
010+ < Date: Sun, 17 Mar 2019 05:56:26 GMT
011+ < Server: Apache/2.2.15 (CentOS)
012+ < Location: http://gcov.php.net/responder/
013+ < Content-Length: 238
014+ < Connection: close
015+ < Content-Type: text/html; charset=iso-8859-1
016+ < 
017+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
018+ <html><head>
019+ <title>301 Moved Permanently</title>
020+ </head><body>
021+ <h1>Moved Permanently</h1>
022+ <p>The document has moved <a href="http://gcov.php.net/responder/">here</a>.</p>
023+ </body></html>
024+ * Closing connection #0
025+ Ok

 

Generated at Tue, 19 Mar 2019 00:18:08 +0000 (4 days ago)

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