RE: [PHP4BETA] Session with MySQL
| From: | John Hamlik | Date: | Sat, 18 Sep 1999 00:03:29 +0000 |
| Subject: | RE: [PHP4BETA] Session with MySQL | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4599@lists.php.net to get a copy of this message | ||
Thank you for adding the user interface for the session object, I will
be testing shortly.
In our session module we have the ability to prefix a variable with s_
so that it is automatically registered as a session variable. This
saves us the time of calling session_register for all of the variables.
It seems like I would need a tie into session_start() in order to
duplicate this functionality. Is this possible?
Thanks,
John
> -----Original Message-----
> From: Sascha Schumann [mailto:sascha@schumann.cx]
> Sent: Thursday, September 16, 1999 11:12 PM
> To: John Hamlik
> Cc: 'php4beta@lists.php.net'
> Subject: Re: [PHP4BETA] Session with MySQL
>
>
> On Fri, Sep 17, 1999 at 02:37:55AM +0200, Sascha Schumann wrote:
> > On Thu, Sep 16, 1999 at 10:51:09AM -0700, John Hamlik wrote:
> > > We run php3 on a server cluster and have written our own
> session object
> > > that stores its information in a MySQL database. I know php4 now
> > > includes a session object that is very similiar to the one we have
> > > written. My questions are:
> > >
> > > Can the built in session object store its information in a MySQL
> > > database?
> >
> > Providing user level functions has to be implemented yet.
>
> It's implemented now. I've attached a demo which demonstrates
> how this facility can be used.
>
> Output of script:
>
> $ ./php save_handler.php
> Content-Type: text/html
> Set-cookie: PHPSESSID=f08b925af0ecb52bdd2de97d95cdbe6b
>
> open (/tmp, PHPSESSID)
> read (f08b925af0ecb52bdd2de97d95cdbe6b)
> write (f08b925af0ecb52bdd2de97d95cdbe6b, foo|i:2;)
> close
>
> You would have to extend the functions to cover MySQL.
>
> --
>
> Regards,
>
> Sascha Schumann
> Consultant
> --
> PHP 4 Beta
>