CGI::Session::Serialize::php - PHP serializer for CGI::Session
This library can be used by CGI::Session to serialize session data. It is a wrapper around the PHP::Session::Serializer::PHP. Use of this serializer allows common session data storage when writing Web Applications in both Perl and PHP. NOTE: you will need to store the Session ID in your PHP session data structure as $_SESSION['_SESSION_ID'] = session_id(); as the return from the thaw() method is checked for it's existance. CGI::Session will croak with the error "Invalid data structure returned from thaw()" if it is not seen. Be careful storing arrays as arrays look like hashes once serialized and deserialized. You will need extra logic to convert them back to arrays again. Don't forget to add 'serializer:php' to your CGI::Session initialization string.
PHP::Session::Serializer::PHP
thaw()
CGI::Session
Receives two arguments. First is the class name, the second is the session data to be serialized. Should return serialized string on success, undef on failure. Error message should be set using set_error()|CGI::Session::ErrorHandler/"set_error()"
set_error()|CGI::Session::ErrorHandler/"set_error()"
Receives two arguments. First is the class name, second is the PHP serialized data string. Should return deserialized session data structure on success, undef on failure. Error message should be set using set_error()|CGI::Session::ErrorHandler/"set_error()"
PHP
CGI::Session, PHP::Session::Serializer::PHP.
To install CGI::Session::Serialize::php, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Session::Serialize::php
CPAN shell
perl -MCPAN -e shell install CGI::Session::Serialize::php
For more information on module installation, please visit the detailed CPAN module installation guide.