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,
Steve


In reply to Re: Using Sessions between perl and php. by jryan
in thread Using Sessions between perl and php. by jryan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.