|  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
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-11-05 (snap) OS: windows xp
Private report: No CVE-ID:
 [2005-11-05 20:34 UTC] stochnagara at hotmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-07 15:31 UTC]
Assigned to the maintainer.
 [2005-11-07 18:16 UTC]
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
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]
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-2015 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 00:01:40 2015 UTC