views:

336

answers:

2

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.

+2  A: 

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.

Javier Constanzo
Mediawiki already has hooks to allow you to determine how the session is read, but I don't know (exactly) how to parse the CGI::Session object into php..
Timmy
+2  A: 

You could use the PHP::Session module. Check out Using Perl Code from PHP for other ideas.

Youdaman