| 
      
      
      From: Jure S. <jur...@li...> - 2002-04-15 08:05:02
      
     | 
| Chris Winters wrote:
> On Fri, 2002-04-12 at 09:15, Jure Simsic wrote:
> 
>>Apart from first not being able to write to tmplib, I got:
>>
>>$ perl test/test2.pl
>>Hisa::User::_class_initialize (15) >> Set Hisa::User to use crypt (1)
>>$VAR1 = {
>>           '_session_id' => 'd90e4e7bb6458ebb69ae8fa9c330e341'
>>         };
>>
>>(i deleted my session and reinitialized it in between, so the ID is right)
>>
>>Any clues?
>>
> 
> The next step would be to create a brand new session in the test script,
> then retrieve that same session from the test script to see if it works
> ok. 
> 
So I did:
--
use strict;
use Apache::Session::Postgres;
use Data::Dumper qw( Dumper );
use OpenInteract::Startup;
my $WEBSITE_DIR = $ENV{OIWEBSITE};
#my $SESSION_ID  = 'd90e4e7bb6458ebb69ae8fa9c330e341';
my $SESSION_ID  = undef;
{
   my $R = OpenInteract::Startup->setup_static_environment(
                                    $WEBSITE_DIR );
   my ( %session );
   tie %session, 'Apache::Session::Postgres',
     $SESSION_ID, { Handle => $R->db };
   $SESSION_ID = $session{'_session_id'};
   print Dumper( \%session );
   untie %session;
    tie %session, 'Apache::Session::Postgres',
      $SESSION_ID, { Handle => $R->db };
   print Dumper( \%session );
}
--
and I get:
perl test2.pl
Hisa::User::_class_initialize (15) >> Set Hisa::User to use crypt (1)
$VAR1 = {
           '_session_id' => '80611dd437ef713d76bafe5997d3d7af'
         };
$VAR1 = {
           '_session_id' => '80611dd437ef713d76bafe5997d3d7af'
         };
What kind of result should I be expecting?
> AFAIK, I haven't seen any other problems with Postgres and
> Apache::Session. What versions of PostgreSQL, DBI, DBD::Pg and
> Apache::Session are you using?
> 
perl -MDBD::Pg -e' print $DBD::Pg::VERSION,"\n"'
1.01
perl -MApache::Session -e' print $Apache::Session::VERSION,"\n"'
1.54
postgresql-7.0.3
j-)
 |