Greetings,
Please excuse my lengthy Post - I am trying to be specific. I have been given the responsibility to transition a lot of our mod_perl technology to a more programmer friendly environment - so I am checking PHP out. A complete port is unfeasible as it would take me too much time and trouble, so a transition will have to suffice. The first logical place to begin the transition (in my mind), would be to provide a bridge between session data for both technologies. While I could write a completely custom way to do this in PHP (thus giving me full control), I would prefer to make use of PHP's built-in session management routines (forecasting compatibility with other PHP code). Since I can modify my Perl session routines easily (I have full control over these - currently a hack on Apache::Session), the question boils down to: how does PHP export the session variables/data - a simple string, PHP code to be evaled, bytecode, or some other format?
The PHP documentation indicated that I have some control over how session things behave with the session_set_save_handler() method - I read all of the documentation regarding session handling, including user comments, but couldn't find what I needed. I basically need the Perl code to read/write the same format that PHP exports the session variable(s) as - which will be hard to do elegantly if it is bytecode. In fact, if it is bytecode, I will more than likely not use PHP's internal routines for session handling on account of my laziness.
I will publish the routines used to extend the PHP session handling and the Perl code used to read the PHP session data if I can do this via PHP's internal session routines - I imagine that others could benefit from such code since there is a LOT of Perl code out there and a lot of Perl coders who are moving over to PHP for most day to day stuff since it is much faster to develop in PHP (hopefully :-).
I would just compile PHP/apache and figure this out myself, but thought maybe somebody might already know. I am currently considering a few other alternatives (of which PHP is one - and the strongest candidate at this time) and compiling/configuring/figuring out syntax each of them to find this information out would take some time to do.
I greatly appreciate any help you can give me!
Mike