Apache2::ASP::SessionStateManager - Base class for Session State Managers.
Within your ASP script:
<% $Session->{counter}++; $Response->Write("You have viewed this page $Session->{counter} times."); %>
The global $Session object is an instance of Apache2::ASP::SessionStateManager or one of its subclasses.
$Session
Apache2::ASP::SessionStateManager
It is a blessed hash that is persisted to a database. Use it to share information across all requests for one user.
NOTE: - do not store database connections or filehandles within the $Session object because they cannot be shared across different processes or threads.
Stores the Session object in the database. Returns true.
The file apache2-asp-config.xml should contain a section like the following:
apache2-asp-config.xml
<?xml version="1.0"?> <config> ... <data_connections> ... <session> <manager>Apache2::ASP::SessionStateManager::MySQL</manager> <cookie_name>session-id</cookie_name> <cookie_domain>.example.com</cookie_domain> <dsn>DBI:mysql:dbname:localhost</dsn> <username>sa</username> <password>s3cr3t!</password> <session_timeout>30</session_timeout> </session> ... </data_connections> ... </config>
The database named in the XML config file should contain a table like the following:
CREATE TABLE asp_sessions ( session_id char(32) NOT NULL, session_data blob, created_on datetime default NULL, modified_on datetime default NULL, PRIMARY KEY (session_id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.
Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.
John Drago <jdrago_999@yahoo.com>
Copyright 2007 John Drago, All rights reserved.
This software is free software. It may be used and distributed under the same terms as Perl itself.
To install Apache2::ASP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::ASP
CPAN shell
perl -MCPAN -e shell install Apache2::ASP
For more information on module installation, please visit the detailed CPAN module installation guide.