php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35118 Using PDOStatement child class crashe Apache
Submitted: 2005-11-05 20:34 UTC Modified: 2005-11-09 12:58 UTC
From: stochnagara at hotmail dot com Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-11-05 (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: stochnagara at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-11-05 20:34 UTC] stochnagara at hotmail dot com
Description:
------------
When I try to use a class which extends PDOStatement, my apache crashes. Here is a simple reproduce script:

Reproduce code:
---------------
class MAppPDOStatement extends PDOStatement {
	function __construct ($pdo) {
		parent::__construct ($pdo);
		$this->setFetchMode (PDO::FETCH_OBJ);
	}
}

$a = new PDO("sqlite::memory:");
$a->exec ("create table test (id int not null unique, name string)");
$a->prepare ("select * from sqlite_master", array (PDO::ATTR_STATEMENT_CLASS => 'MAppPDOStatement'));


Expected result:
----------------
no errors

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-07 15:31 UTC] sniper@php.net
Assigned to the maintainer.
 [2005-11-07 18:16 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.


 [2005-11-08 22:03 UTC] stochnagara at hotmail dot com
Still present in latest snap.
Maybe forgot to commit?
 [2005-11-09 11:16 UTC] iliaa@php.net
Are you using PHP 5.1 or 5.0 snap? You need to use the 5.1 snapshot.
 [2005-11-09 12:58 UTC] stochnagara at hotmail dot com
Yes, I've used 5.1 snap. Now I've just downloaded latest snap and the sample above works perfectly well:)

So it's closed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 01 07:01:29 2025 UTC