Michael,

The error message indicates that Perl cannot find the Session.pm 
module. Be sure you have installed the module properly. If you have to 
install it locally on an ISP, then you'll need to add:
        use lib '/path/to/your/modules/';

Hope this helps,
William

On 3 Jun 2001, at 19:38, Michael Chopek wrote:

> Hi Folks;
> 
> I'm trying to get a handle on using "sessions" so I have been trying to get
> through the docs at;
> 
> http://www.awu.id.ethz.ch/~th/session/
> (Session.pm)
> 
> He has a few sample programs and his first is below;
> 
> #!/usr/bin/perl -w                                     
>  # Hello World.
>  use strict;
>  use vars qw($sob);
> 
>  use Session;
>  local $sob = Session->new();
> 
>  if ($sob->open_session(0)) {
>      main();
>  }
>  $sob->close_session;
> 
>  #------------------------ main 
>  sub main {
>      if ( $sob->{COMPONENT}{call_number} ) {
>          $sob->{COMPONENT}{call_number}++;
>      } else {
>          $sob->{COMPONENT}{call_number} = 1;
>      }
>      print $sob->header(),
>            $sob->start_html('Hello', '[EMAIL PROTECTED]'), 
>            "<h1>Hello World</h1>
>            Your Sessions ID is $sob->{SESSION}{_session_id}<p>
>            This is your $sob->{COMPONENT}{call_number}. call to main.cgi.
>            <p>\n", $sob->end_html; 
>      return;
>  }
> 
> He says to name the file "main.cgi" and view it through the
> browser....yet when I try to, I get the dreaded 500 Server error.
> 
> Running the program from the command line and the Apache error logs
> produce this..
> 
> Can't locate object method "new" via package "Session" at main.cgi line 7.
> 
> Any ideas why the example above will not run at my site?
> 
> I know I'm missing something simple here..just not sure what.
> 
> - thanks -
> 
>  -- 
> 
>        best regards
>                 -michael
> 


--
 [EMAIL PROTECTED]
 www.knowmad.com
 Charlotte, NC

Reply via email to