php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37725 PDO's nextRowset() crashes PHP with "Access Violation"
Submitted: 2006-06-07 10:23 UTC Modified: 2006-09-01 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nicolas at serpe dot org Assigned: Wez (profile)
Status: No Feedback Package: PDO related
PHP Version: 5CVS-2006-06-07 (snap) OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicolas at serpe dot org
New email:
PHP Version: OS:

 

 [2006-06-07 10:23 UTC] nicolas at serpe dot org
Description:
------------
The nextRowset() function of PDO, when used with a stored procedure which returns more than 1 result set, crashes PHP with an "Access Violation" error.

I encountered this bug with the latest CVS snapshot of PHP, on IIS 5 and Windows XP. The Database is MS SQL Server 2000.

Reproduce code:
---------------
<?php

$conn = new PDO("odbc:Driver={SQL Server};Server=myserver;Database=mydb;Trusted_Connection=yes;");

$sql = 'EXECUTE Test';
$stmt = $conn->query($sql);
$i = 1;
do {
	$rowset = $stmt->fetchAll(PDO::FETCH_NUM);
	if ($rowset) {
		printResultSet($rowset, $i);
	}
	$i++;
} while ($stmt->nextRowset());

function printResultSet(&$rowset, $i) {
	print "<br />Result set $i:<br />";
	foreach ($rowset as $row) {
		foreach ($row as $col) {
			print $col . "\t";
		}
		print "<br />";
	}
	print "<br />";
}

?>

Expected result:
----------------
An output of the 3 result sets.

Actual result:
--------------
PHP has encountered an Access Violation at 010ABAEC
Result set 1:
0
1
2
7
8
9
10
11
12
13


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-24 14:37 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-09-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 12:01:36 2025 UTC