I made two calls to ties for a test and the server comsume alot of CPU and
never return. So I don't know what is going on.

...
print "Content-type: text/html\n\n";
tie %session, 'Apache::Session::File', undef;
$sessId = $session{_session_id};
print "id: " . $sessId . "\n";

#the prog get hung when I added this line
tie %session, 'Apache::Session::File', $sessId;
$sessId = $session{_session_id};
print "id: " . $sessId . "\n";
...

In any case, are you saying that I have to pass the sessionId to the
client as a cookie as in the doc? If so, isn;t there a package that
already wraps this up for me?

thanks


>         Hello.
> Have you read `perldoc Apache::Session`? There is two examples.
>
> [EMAIL PROTECTED] wrote:
>
>>I'm getting a new id with every refresh click; so, how am I suppose to
>>know it is the same session? Here's my code:
>>
>>#!/usr/bin/perl
>>use Apache::Session::File;
>>use strict;
>>use warnings;
>>
>>my %session;
>>my $sessId;
>>
>>#I'm suppose to put the session id at the undef
>>#but how am i suppose to #know what it is the next time around?
>>#tie %session, 'Apache::Session::File', undef,
>># { Directory => '/tmp', LockDirectory =>'/tmp' };
>>
>>tie %session, 'Apache::Session::File';
>>
> What about third argument??? It have to be session_id if you wnat old
> one or undef if you want new.
> So you have to store session_id somewhere on the client side!
>
>>$sessId = $session{_session_id};
>>print "Content-type: text/html\n\n";
>>print "id: " . $sessId . "\n";
>>
>>...
>>
>>What am I doing wrong?
>>
>>thanks
>>
>>
>>
>
>
>
>



-----------------------------------------
eMail solutions by 
http://www.swanmail.com

Reply via email to