php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26534 stream_get_meta_data() -> Access Violation
Submitted: 2003-12-05 15:07 UTC Modified: 2003-12-06 03:35 UTC
From: heino@php.net Assigned:
Status: Closed Package: *General Issues
PHP Version: 5CVS-2003-12-05 (dev) OS: WinXP
Private report: No CVE-ID:
 [2003-12-05 15:07 UTC] heino@php.net
Description:
------------
Something strange has happend stream_get_meta_data() between b1 and b2!

Doing a stream_get_meta_data() on a tcp_socket stream results in an Access Violation.

The "Actual Result" says it all...

Reproduce code:
---------------
$host = 'localhost';
$port = 80;

$stream = stream_socket_client($host.':'.$port, $errno, $errstr);

// fwrite($stream, "GET / HTTP/1.1\r\nHost: $host\r\n\r\n");

// echo fread($stream, 10240);

var_dump(stream_get_meta_data($stream));


Expected result:
----------------
PHP Version 5.0.0b1:

array(7) {
  ["stream_type"]=>
  string(10) "tcp_socket"
  ["mode"]=>
  string(2) "r+"
  ["unread_bytes"]=>
  int(0)
  ["seekable"]=>
  bool(false)
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(true)
}


Actual result:
--------------
PHP Version 5.0.0b2 & 5.0.0b3-dev:

PHP has encountered an Access Violation at 010C80AD

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-05 15:23 UTC] wez@php.net
I think I just fixed this; can you try the next php5 snapshot? (dated after this report)
 [2003-12-06 03:35 UTC] heino@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

As of the newest snapshot (20031206-0730) the bug seems to be no more.

BTW Fixing a bug in 16 minutes - isn't that rather close to a record.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 12:01:52 2014 UTC