Re: Sessions, Constructors, and Destructors - Oh my!
| From: | Dan Trainor | Date: | Mon, 29 Aug 2005 21:11:08 +0000 |
| Subject: | Re: Sessions, Constructors, and Destructors - Oh my! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221552@lists.php.net to get a copy of this message | ||
Thanks for replying, Jasper -
<snip>
>> Is this possible? Does it work this way? If so, or if not for that
>> matter, please help me out here to better understand how these three
>> elements interact with eachother, if at all.
Ah yes, me being quite new didn't take into consideration in which
versions constructors and destructors were available. Thank you.
> I think that (in PHP5 -- PHP4 doesn't have real destructors) you could
> put an object inside the $_SESSION variable and it would be serialized
> in the session (as long as you had the class definition available when
> it was unserialized, i.e. before session_start() is called).
>
<snip>
> The best thing to do in this situation is to write your own
> session_save_handler that uses a database, and point it at the MySQL
> server [2]. If you really had to, you could maybe put the
> session_save_path on the NFS share [3].
I think that'sm y winner, and the best suggestion yet. I will consider
my options.
Thanks
-dant