Reputation: 12828
I'm using Perl's CGI::Session with MySQL. No problems there.
I want to incorporate some other languages, most notably PHP, to use the same session cookie. How would I do that?
Almost the entire site is in Perl, but I want to use free PHP things, like forums and mediawiki, and still use the same session cookie.
Upvotes: 0
Views: 1333
Reputation: 574
If you use CGI::Session, you could change the serializer to YAML, and then use PHP to parse YAML.
Alternatively, if you find YAML parsing difficult, you could write your own serializer for CGI::Session, e.g. using JSON, which you can more easily parse. Than you would just use the same session id in PHP as the one you use in Perl.
Upvotes: 0
Reputation: 223
You could use the PHP::Session module. Check out Using Perl Code from PHP for other ideas.
Upvotes: 2
Reputation: 439
I've never tried this, but see the session_set_save_handler function. Some frameworks (like CakePHP) use this to store the session in a database. Maybe you could write some code to use the same session as perl, prepending this script to your forum, wiki, etc.
Upvotes: 2