PHP :: Bug #34809 :: PDO FETCH_INTO crashes Apache

Bug #34809 PDO FETCH_INTO crashes Apache
Submitted: 2005-10-10 12:58 UTC Modified: 2005-10-10 16:44 UTC
From: stochnagara at hotmail dot com Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-10-10 (snap) OS: windows xp
Private report: No CVE-ID: None

 [2005-10-10 12:58 UTC] stochnagara at hotmail dot com

Description:
------------
The code bellow crashes Apache server. The crash is similar to bug #34802 but the crash code is quite different.

Reproduce code:
---------------
<?
$pdo = new PDO('mysql:host=localhost;dbname=borovo');
$sth = $pdo->prepare ('SELECT nid,type FROM node');
$sth->execute();
var_dump ($sth->fetch (PDO::FETCH_INTO, 3));



Expected result:
----------------
Warning: PDOStatement::fetch() [function.fetch]: SQLSTATE[HY000]: General error: PDO_FETCH_FUNC is only allowed in PDOStatement::fetchAll() in C:\Program Files\Apache Group\Apache2\htdocs\boroinvest\test.php on line 5
bool(false) 

Actual result:
--------------
Apache crashes.

Log message:
Parent: child process exited with status 3221225477 -- Restarting.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2005-10-10 13:03 UTC] stochnagara at hotmail dot com

Sorry,

"General error: PDO_FETCH_FUNC is only allowed in"

should be read as 

"General error: PDO_FETCH_INTO is only allowed in"

or just fetch record in mode FETCH_INTO if this is allowed.

 [2005-10-10 16:44 UTC] iliaa@php.net

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.