On 9/20/07, James McLean <james.mclean@xxxxxxxxx> wrote: > Howdy, > > I'm attempting to implement APC into my framework, but running into > some issues. I'm using PostgreSQL 8.2 with PDO, on PHP 5.2.2 running > on Gentoo Linux. > > When ever I attempt to save my result set obtained from the database > into the APC cache, it throws an exception with the following message: > 'You cannot serialize or unserialize PDOStatement instances'. > > Stack trace shows the __sleep() method on the PDOStatement throws the > exception when it is called inside apc_store(). > > I've attempted to use ObjectArray from SPL, however you seem to loose > the methods on the object, which is clearly no good for me either. > > Has anyone got APC working with PDOStatement result sets? I have resolved this issue, it turned out I was attempting to cache the incorrect variable. I have outlined the issue and steps to resolve it on my website: http://blog.phpguy.org/2007/09/21/apc-and-web-application-performance-take-2/ Cheers James -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php