8 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package Sessions;
use Apache::Session::MySQL;
use db_lib;
my %session;
my ($dbh);
my $db = "usrdb_help_projekt_1";
$dbh=connect_db($db) or die 'cant connect';
sub get_session{
my $session_id=shift;
$session_id =~ s/ //g;
tie %session, 'Apache::Session::MySQL', $session_id, {
Handle => $dbh,
LockHandle => $dbh
};
$session{first_name} = "Chuck";
return %session;
}
sub new_session{
tie %session, 'Apache::Session::MySQL', undef, {
Handle => $dbh,
LockHandle => $dbh
};
$session{first_name} = "Csdf";
return %session;
}
1
2
3
4
5
6
% my %test;
% if(exists $ARGS{session_id}){
% %test=Sessions->get_session($ARGS{session_id});
%} else {
% %test=Sessions->new_session;
%}
use Session;
QuoteAufrufen tue ich es über eine Mason Komponente
Code: (dl )1
2
3
4
5
6% my %test;
% if(exists $ARGS{session_id}){
% %test=Sessions->get_session($ARGS{session_id});
%} else {
% %test=Sessions->new_session;
%}
% if(exists $ARGS{session_id} && length( $ARGS{session_id} )&& $ARGS{session_id} =~ /[a-z0-9]+/ ) {
QuoteSystem error
error: Can't locate object method "get_session" via package "Sessions" at /var/www/devel.help-projekt.de/htdocs/autohandler line 140.
context:
...
135:
136: <!-- Title: Help-Projekt.de - Tutorials, PC-Forum, Programmierung, Mason -->
137:
138: <!-- URL: http://www.help-projekt.de -->
139: % my %test;
140: % if(exists $ARGS{session_id}){
141: % %test=Sessions->get_session($ARGS{session_id});
142: %} else {
143: % %test=Sessions->new_session;
...
code stack: /var/www/devel.help-projekt.de/htdocs/autohandler:139
Quoteerror: Object does not exist in the data store at /usr/local/share/perl/5.8.4/Apache/Session/Store/DBI.pm line 93.
context:
...
89:
90: my $results = $self->{materialize_sth}->fetchrow_arrayref;
91:
92: if (!(defined $results)) {
93: die "Object does not exist in the data store";
94: }
95:
96: $self->{materialize_sth}->finish;
97:
...
code stack: /usr/local/share/perl/5.8.4/Apache/Session/Store/DBI.pm:93
/usr/local/share/perl/5.8.4/Apache/Session.pm:496
/usr/local/share/perl/5.8.4/Apache/Session.pm:407
/var/www/devel.help-projekt.de/htdocs//Sessions.pm:12
/var/www/devel.help-projekt.de/htdocs/autohandler:139
8 Einträge, 1 Seite |