I've made a module of hell. PHP::Session which enables you to read / write PHP4 builtin session files from Perl. Thus you can share your session data between Perl and PHP. Nightmare!
I once wrote something similar, and similarly horrific for... NetForms? I think that was it. Or maybe it was Tango. It was one of those two products, each of which have outlived their welcome on Earth by the entire duration of their existence.