httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Arimura" <newsgro...@alldorm.com>
Subject RE: [users@httpd] Apache::Session trouble
Date Tue, 18 May 2004 21:51:14 GMT

Nm...  I solved my own problem.

After about 5 hours of trying different things, it turns out there was a
semicolon in my session id that was writing to the cookie, so when I pulled
it back out it wasn't fetching the session properly...

</vent>


Chad


-----Original Message-----
From: Chad Arimura [mailto:newsgroups@alldorm.com] On Behalf Of
newsgroups@alldorm.com
Sent: Tuesday, May 18, 2004 1:18 PM
To: users@httpd.apache.org
Subject: [users@httpd] Apache::Session trouble


I'm trying to use Apache::Session on the following server:  Apache/2.0.47
(Unix) mod_perl/1.99_13 Perl/v5.8.0.

I can get it to generate a session id, session file, and lock file on the HD
no problem, but when I try and tie the %session hash to the current
session_id everything stops working (I can't get any output).  Here is the
code:

# Get session id from cookie
my @cvals = $q->cookie( -name => 'session' );
my $id = $cvals[0] || "";

# create session
my %session;
eval {
	# Sessions handled by file

	tie %session, 'Apache::Session::File', $id, {
	  Directory     => '/tmp/sessions',
	  LockDirectory => '/tmp/sessions',
	  Transaction   => 1
	};
};
if ($@) {
    die "Session is not accessible: $@";
}


Everything works when I tie the session to an undef value rather than $id,
but then the program creates a new session every time...

What am I doing wrong?

Thanks,
Chad Arimura
AllDorm Inc.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message