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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 38 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC