You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by pe...@swanmail.com on 2003/10/05 05:51:02 UTC

Simple mod_perl Session and Persistent Script

I have redhat 9 with mod_perl-1.99_07-5.

I'm just beginning into mod_perl.

Without loading any other library than the one loaded with redhat, Is
there a session variable and how can I hold a persistence object? I'm
looking for a simple example:

#!/usr/bin/perl

use strict;
use warnings;

#I guess I would need the type of declaration my, our, ...

$counter  #persistent object or global or what

$sess     #get the session var

print "session: " . $sess . " counter: " . $counter ."\n";

thanks,
rkl

Re: Simple mod_perl Session and Persistent Script

Posted by pe...@swanmail.com.
Lets say I find the latest mod_perl rpm.

- Is there a mod_perl rpm for redhat?

- If yes, is the redhat rpm different than other rpm?

- I don't know anything about configuring mod_perl;so, is the
/etc/httpd/conf.d/perl.conf the only configurable I need to worry about on
upgrading?

- Do I just un rpm the previous version and add the new
  or do I just add the latest rpm?

thanks
-rkl

> perl@swanmail.com wrote:
>
>> I have redhat 9 with mod_perl-1.99_07-5.
>
> That's more than a year out of date, and many bugs have been fixed since
> then, as you can see here:
> http://perl.apache.org/dist/mod_perl-2.0-current/Changes
>
> If you plan to do anything much with it, you should upgrade to the most
> recent release (or switch to apache 1.x and mod_perl 1.x if you need a
> stable platform).
>
>> Without loading any other library than the one loaded with redhat, Is
>> there a session variable and how can I hold a persistence object?
>
> No, there is no concept of a session built into mod_perl.  That's
> because mod_perl is an API for building apache modules in Perl, and
> doesn't make assumptions about how you want your application to work.
> There are easy-to-use session options available on CPAN.  I'd suggest
> looking at CGI::Session or Apache::Session (both work with mod_perl) or
> a more complete development system like Apache::ASP (also on CPAN).
> Also, have a look here for more development frameworks that run on
> mod_perl:
> http://perl.apache.org/products/app-server.html
>
> - Perrin
>
>


Re: Simple mod_perl Session and Persistent Script

Posted by pe...@swanmail.com.
> perl@swanmail.com wrote:
>
>> I have redhat 9 with mod_perl-1.99_07-5.
>
> That's more than a year out of date, and many bugs have been fixed since
> then, as you can see here:
> http://perl.apache.org/dist/mod_perl-2.0-current/Changes
>
> If you plan to do anything much with it, you should upgrade to the most
> recent release (or switch to apache 1.x and mod_perl 1.x if you need a
> stable platform).
>
>> Without loading any other library than the one loaded with redhat, Is
>> there a session variable and how can I hold a persistence object?
>
> No, there is no concept of a session built into mod_perl.  That's
> because mod_perl is an API for building apache modules in Perl, and
> doesn't make assumptions about how you want your application to work.
> There are easy-to-use session options available on CPAN.  I'd suggest
> looking at CGI::Session or Apache::Session (both work with mod_perl) or
> a more complete development system like Apache::ASP (also on CPAN).
> Also, have a look here for more development frameworks that run on
> mod_perl:
> http://perl.apache.org/products/app-server.html
>
> - Perrin
>
>


Re: Simple mod_perl Session and Persistent Script

Posted by Perrin Harkins <pe...@elem.com>.
perl@swanmail.com wrote:

> I have redhat 9 with mod_perl-1.99_07-5.

That's more than a year out of date, and many bugs have been fixed since 
then, as you can see here:
http://perl.apache.org/dist/mod_perl-2.0-current/Changes

If you plan to do anything much with it, you should upgrade to the most 
recent release (or switch to apache 1.x and mod_perl 1.x if you need a 
stable platform).

> Without loading any other library than the one loaded with redhat, Is
> there a session variable and how can I hold a persistence object?

No, there is no concept of a session built into mod_perl.  That's 
because mod_perl is an API for building apache modules in Perl, and 
doesn't make assumptions about how you want your application to work. 
There are easy-to-use session options available on CPAN.  I'd suggest 
looking at CGI::Session or Apache::Session (both work with mod_perl) or 
a more complete development system like Apache::ASP (also on CPAN). 
Also, have a look here for more development frameworks that run on mod_perl:
http://perl.apache.org/products/app-server.html

- Perrin