You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by harilaos <ha...@ntlworld.com> on 2001/02/05 16:43:50 UTC

Apache::Session::File

Hello,
I ma trying to use this module to store persident data on file
on win32 environment.
I use the code:

use Apache;
use Apache::Session::File;
use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser);

print header();
print start_html;
  
 my %global_data;
 
 eval {
     tie %global_data, 'Apache::Session::File', 1,
        {Directory => '/temp/sessiondata'};
 };
 if ($@) {
    die "Global data is not accessible: $@";
 }
 
print "hello";

print end_html;

I get error in apache logs :
Can't locate IPC/SysV.pm in @INC 

do I need the IPC/SysV.pm module?
I have searched the documentation but i don't see a simple clear example
to do this.

Can you help please?

Thanks

Re: Apache::Session::File

Posted by harilaos <ha...@ntlworld.com>.
How do i change this locking mechanish of win32?
Am i using the wrong module? From apache::session::* modules
do you know which are supposed to work on win32?

Thanks

Gunther Birznieks wrote:
> 
> You need to change the locking mechanism on Win32 to not use IPC. I believe
> there are examples for using Flock based locking but am not sure.
> 
> If you are using win32 mod_perl, locking is irrelevant anyway because all
> requests are serialized through one engine.
> 
> At 03:43 PM 2/5/01 +0000, harilaos wrote:
> >Hello,
> >I ma trying to use this module to store persident data on file
> >on win32 environment.
> >I use the code:
> >
> >use Apache;
> >use Apache::Session::File;
> >use CGI qw/:standard/;
> >use CGI::Carp qw(fatalsToBrowser);
> >
> >print header();
> >print start_html;
> >
> >  my %global_data;
> >
> >  eval {
> >      tie %global_data, 'Apache::Session::File', 1,
> >         {Directory => '/temp/sessiondata'};
> >  };
> >  if ($@) {
> >     die "Global data is not accessible: $@";
> >  }
> >
> >print "hello";
> >
> >print end_html;
> >
> >I get error in apache logs :
> >Can't locate IPC/SysV.pm in @INC
> >
> >do I need the IPC/SysV.pm module?
> >I have searched the documentation but i don't see a simple clear example
> >to do this.
> >
> >Can you help please?
> >
> >Thanks
> 
> __________________________________________________
> Gunther Birznieks (gunther.birznieks@extropia.com)
> eXtropia - The Web Technology Company
> http://www.extropia.com/

Re: Apache::Session::File

Posted by Gunther Birznieks <gu...@extropia.com>.
You need to change the locking mechanism on Win32 to not use IPC. I believe 
there are examples for using Flock based locking but am not sure.

If you are using win32 mod_perl, locking is irrelevant anyway because all 
requests are serialized through one engine.

At 03:43 PM 2/5/01 +0000, harilaos wrote:
>Hello,
>I ma trying to use this module to store persident data on file
>on win32 environment.
>I use the code:
>
>use Apache;
>use Apache::Session::File;
>use CGI qw/:standard/;
>use CGI::Carp qw(fatalsToBrowser);
>
>print header();
>print start_html;
>
>  my %global_data;
>
>  eval {
>      tie %global_data, 'Apache::Session::File', 1,
>         {Directory => '/temp/sessiondata'};
>  };
>  if ($@) {
>     die "Global data is not accessible: $@";
>  }
>
>print "hello";
>
>print end_html;
>
>I get error in apache logs :
>Can't locate IPC/SysV.pm in @INC
>
>do I need the IPC/SysV.pm module?
>I have searched the documentation but i don't see a simple clear example
>to do this.
>
>Can you help please?
>
>Thanks

__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
eXtropia - The Web Technology Company
http://www.extropia.com/