in reply to Re: Re: Using Sessions between perl and php.
in thread Using Sessions between perl and php.
You are completely missing the whole point of this: IT IS NOT PURE PERL. Its not. Really.
We used Apache::Session because it worked. It works well. PHP sessions also worked well for us. These two systems were already in place.
Now, we needed them to talk to each other. PHP provides a method to the default session handling functions. Rather than screw with Apache::Session::MySQL (of which we already had a bitch of a time getting installed), we decided the best route to take was to take advantage of PHP's overridable functions. So we did. The key part here (which you seem to disagree with, probably because you haven't researched this very deeply), is that we needed a way to take the php-serialized data and convert it to perl-serialized data.Thats where the perl script that the php script calls comes in. A php-serialized associative array is passed as a command line argument. A perl module deserializes this structure into a hash. The hash is then serialized with Storable. This string is then updated into the sessions database. A reverse process is done when the session data is extracted. Perl, on the other hand, simply grabs the data using the normal Apache::Session::MySQL.
Yes, its a bit odd, but then it isn't a very normal task. Using our method, pure perl scripts can still take advantage of the full power of Storable, AND we didn't have to have a hacked version of Apache::Session::MySQL in order to get it to work. I fail to see how your method is any easier ours...
|
---|