perl and php data-structure interoperability
| From: | scott [gts] | Date: | Fri, 29 Jun 2001 21:11:46 +0000 |
| Subject: | perl and php data-structure interoperability | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-55607@lists.php.net to get a copy of this message | ||
i've been working on a method of handling sessions that
would be portable and easy to implement in PHP and Perl.
i've got everything working fine except the
interoperability of serialized data.
the reason it's important is becuase my session table
basically looks like this: (i left out the 'timestamp'
field, becuase it's not relevant)
id name data
-- ---- ----
1 scott serialized array
the 'data' field is a TEXT type (in my Mysql DB) that
is meant to store a serialized assoc. array.
this enables me to easily store and retrieve an
arbitrary amount of data about the user.
but i havent found any cross-language way of serializing
and unserializing data structures.
of course, i could roll my own, but before i go to the
trouble of writing a whole php-compatible serialize and
deserialize module for perl, can anyone offer any help
or suggestions on how to make PHP and Perl recognize each
other's serialized data?