View Issue Details

IDProjectCategoryView StatusLast Update
0000375XdebugUncategorizedpublic2009-11-22 16:58
Reporterjpic Assigned To 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionunable to reproduce 
Summary0000375: Serializing PDO causes an error, stack trace required
Description

Serializing PDO causes "PDOException: You cannot serialize or unserialize PDO instances", but no stack trace is provided.

TagsNo tags attached.
Operating System
PHP Version5.2.6

Activities

derick

2009-11-22 16:58

administrator   ~0001156

I think this has been fixed recently, I get this:

cat foo.bar

<?php
$a = new PDO( 'mysql:host=localhost;dbname=ezc', 'root', 'wee123') ;
echo serialize( $a );

derick@kossu:/tmp$ php foo.php
PHP Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in /tmp/foo.php:4
Stack trace:
#0 [internal function]: PDO->__sleep()
#1 /tmp/foo.php(4): serialize(Object(PDO))
0000002 {main}
thrown in /tmp/foo.php on line 4

Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in /tmp/foo.php on line 4

PDOException: You cannot serialize or unserialize PDO instances in /tmp/foo.php on line 4

Call Stack:
0.0004 659048 1. {main}() /tmp/foo.php:0
0.0055 660800 2. serialize() /tmp/foo.php:4