RE: [PEAR] db_databobject session serialize

From: Date: Fri, 16 Dec 2005 06:22:54 +0000
Subject: RE: [PEAR] db_databobject session serialize
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22270@lists.php.net to get a copy of this message
Like: require_once 'DB/DataObject/Public_tablename.php'; I think I tried that; but I'm check it out again. No other file you can think of that I need to include? I was just reading the your post to Joseph Szobody's post about serializing a dataobject after a find() you said: Won't work. Doing a find only runs the query. If you don't pull the record (fetch) then you'll lose the result when the script exits. Store each of the fetched objects in an array and put that in a session. Or refactor to not need it. If I have done this could this be the reason why it isn't unserializing nicely? Cheers, Benjamin -----Original Message----- From: Justin Patrin [mailto:papercrane@gmail.com] Sent: Friday, 16 December 2005 5:12 PM To: Benjamin Wragg Cc: pear-general@lists.php.net Subject: Re: [PEAR] db_databobject session serialize On 12/15/05, Benjamin Wragg <bwragg@tpg.com.au> wrote: > I must be missing a file. Are these all I need to include prior to > starting the session: > > require_once 'DB.php'; > require_once 'DB/DataObject/Generator.php'; > requre_once('DB/DataObject.php'); > > I've even tried including: > > include_once('DB/pgsql.php'); > require_once 'DB/DataObject/Generator.php'; > > as well. > > Any I'm missing? > Yep. You need to include the class files for the individual tables that you serialized (put in a session) as well for this to work. > Cheers, > > Benjamin Wragg > > "Justin Patrin" <papercrane@gmail.com> wrote in message > news:432beae0512152141nee9a2u9bf7e120c38e5a0f@mail.gmail.com... > On 12/16/05, Benjamin Wragg <bwragg@tpg.com.au> wrote: > > Hi, > > > > I've read a few threads on the list about problems serializing > > db_dataobjects but I'm still having problems. I need to store a > > dataobject in the clients session (this serializes it), and I also > > am having trouble on unserializing them (php 4.3.4). I get the > > __PHP_Incomplete_Class on my dataobjects on unserializing. I know > > this normally means that you havn't included a class file that was > > needed, but I'm sure that I've including all files needed. > > > > I was reading this thread > > > > http://marc.theaimsgroup.com/?l=pear-general&m=111990952008195&w=2 > > > > and found that ensuring that the files are included is the only real > > solution for php4. Is there anything else that I need to do? > > > > Nope, that's it. > > -- > Justin Patrin > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/200 - Release Date: 14/12/2005 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/200 - Release Date: 14/12/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/200 - Release Date: 14/12/2005

« previous php.pear.general (#22270) next »