R
Raphael Bauduin
Hi,
As more people out there, most or all my web developments are done with Ruby (Ruby on Rails, keeping an eye on Nitro).
As I can't rewrite all existing PHP apps, I've looked at a way to use PHP session with Ruby, and I've written a class parsing a
PHP session (PHPSessionParser) that you initialise with the string being the PHP session data.
I'm storing PHP session in a postgresql database (http://www.csh.rit.edu/~jon/projects/pgsql_session_handler/) and I have written
a CGI session store to use the PHP sessions store in postgresql (called PHPDBIStore as it is using DBI, and not the postgresql driver
directly).
My employer agreed to let me publish it under the LGPL license. You can find the code at http://www.raphinou.com/php.rb
I'm not totally satisfied by the code design (if you look at the code, I'd like to not use the @working_str variable) but it's working for me.
You can store, modify, restore strings, arrays, hashes.
Feedback welcome. I'd like to know how you think this could be made better.
Thanks.
Raph
As more people out there, most or all my web developments are done with Ruby (Ruby on Rails, keeping an eye on Nitro).
As I can't rewrite all existing PHP apps, I've looked at a way to use PHP session with Ruby, and I've written a class parsing a
PHP session (PHPSessionParser) that you initialise with the string being the PHP session data.
I'm storing PHP session in a postgresql database (http://www.csh.rit.edu/~jon/projects/pgsql_session_handler/) and I have written
a CGI session store to use the PHP sessions store in postgresql (called PHPDBIStore as it is using DBI, and not the postgresql driver
directly).
My employer agreed to let me publish it under the LGPL license. You can find the code at http://www.raphinou.com/php.rb
I'm not totally satisfied by the code design (if you look at the code, I'd like to not use the @working_str variable) but it's working for me.
You can store, modify, restore strings, arrays, hashes.
Feedback welcome. I'd like to know how you think this could be made better.
Thanks.
Raph