You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Leandro Lucarella <ll...@mecon.gov.ar> on 2001/12/03 20:15:18 UTC
Embperl %udat serialization
Hi! I have an intranet system working with an integrated login using perl
and Embperl's sessions management, storing the data in a MySQL database.
Now I have some new PHP application that I want to inegrate to this
system, and I need to get the serialized udat information of the Emperl
sessions. What is the format of this data? where can I read about it?
does anyone know a simple way to get the udat hash working in PHP???
Thanks for the help!
--
Leandro Lucarella @ MEcon
_________________________________________________________________________
Powered by Debian GNU/Linux
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Embperl %udat serialization
Posted by Angus Lees <gu...@switchonline.com.au>.
On Mon, Dec 03, 2001 at 04:15:18PM -0300, Leandro Lucarella wrote:
> Hi! I have an intranet system working with an integrated login using perl
> and Embperl's sessions management, storing the data in a MySQL database.
> Now I have some new PHP application that I want to inegrate to this
> system, and I need to get the serialized udat information of the Emperl
> sessions. What is the format of this data? where can I read about it?
> does anyone know a simple way to get the udat hash working in PHP???
Its stored as a big string according to Apache::Session's
serialization code, which usually uses Storable::nfreeze (and then
some other mangling for databases with particular limitations).
You could write a new serialization method and then use that instead
(see the existing Apache::Session::Serialize modules). you would have
to come up with some encoding that was useful for both perl and php
(which probably means using something too simple, like a
"key=value,key=value" string or something too complex like xml).
An alternative would be to use the normal perl code to restore the
session in an earlier mod_perl handler - and store the particular
values you were interested in in Apache's notes tables or even
envirionment variables. I presume there is some way at getting at
these from php. Writing back during cleanup would be a little
trickier, perhaps impossible with environment variables.
hmm, it should not be too hard to write a php plugin which links in
the perl interpreter (perldoc perlembed).. think of the value *that*
would bring to php ;)
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org