in reply to Using Sessions between perl and php.
That should all be shoved into a MySessions module and replaced with:my $params = { DataSource => 'dbi:mysql:sessions', UserName => 'root', Password => '', LockDataSource => 'dbi:mysql:sessions', LockUserName => 'root', LockPassword => '' }; my %session; eval { tie (%session, 'Apache::Session::MySQL', $sess_id, $params); }; tie (%session, 'Apache::Session::MySQL', undef, $params) if ( $@ ); #etcetera
use CGI; use MySessions; my $q=new CGI; MySessions->connect(); my $session=MySessions->retrieve($q->cookie(-name => 'sess_id')); #etcetera
=cut
--Brent Dax
There is no sig.
|
|---|