Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think the problem you guys are failing to understand is that the Apache::Session modules use Storable to serialize the data structures, and stores the data in a very precise way. It has nothing to do with me. Apache::Session is very complex, and handles many issues that I would most likely botch if I tried to roll my own Session handling module. Hence, I didn't. Besides, even if I could force the perl side to act like I want, I would still have to worry about the PHP side. PHP has a very bizarre method of serialization - and I can't change that, it is done internally. I had to cater to one or the other, and I chose to cater to perl. Update: This is from Steve, my partner, perhaps it will clear some things up: Ok, here's the deal. First note that Apache::Session handles most of the saving sessions itself. Admittedly, we did not have to use Apache::Session, but that would mean we would have to write our own Perl session handler, and documentation for it (since jryan and I would not be the primary programmers using the system.) Also note that there were time constraints and no time to write our own complete session handling system and document it. So, the goal was to get **Apache::Session** to work with the PHP sessions. I admit that this isn't an optimal solution, but it works. Now, Apache::Session takes the session data, serializes it with Storable and then stores it in a MySQL database that has an exact structure that MUST be followed. As far as I could tell, there was no way to modify the way this happened, and if there was, it would not be as easy as modifying the way PHP stores the data. PHP, on the other hand, provides and easy method to change the way the data is stored. With PHP, it would be possible to have a MySQL table with columns for each variable, and if we were just using PHP, that is what we would have used.
I hope this clears some things up, In reply to Re: Using Sessions between perl and php.
by jryan
|
|