On Mon, 8 May 2000, Perrin Harkins wrote:
Some apps that use Apache::Session, like Embperl and Mason, have chosen
to rely on cookies. They implement the cookie part themselves.
Apache::Session has nothing to do with cookies.
I don't know about Embperl but Mason a) doesn't do anything with
Autarch wrote:
On Mon, 8 May 2000, Perrin Harkins wrote:
Some apps that use Apache::Session, like Embperl and Mason, have chosen
to rely on cookies. They implement the cookie part themselves.
Apache::Session has nothing to do with cookies.
I don't know about Embperl but Mason a)
Stephen Zander wrote:
I've avoided session management like the plague until now (intranets
let you get away with that sort of thing :)) but rolling out web-based
LDAP is forcing session management upon me.
Other than Apache::Session what are my choices? How well do any of
these play
Hi!
I should migrate Perl-CGIs to mod_perl for performance reasons.
We use many subroutines in our CGIs, which read and write
global (my-defined) variables. Our plain subroutines are not nested,
but they are when the mod_perl wrapper is put around them at execution time.
In this special case,
| QUESTION: But how should I transform the script, if the anonymous subs call
| each other?
| I get always the following error:
| Undefined soubroutine main:: called at script-file line line-no.
| I don't know how to solve this. Is there any solution for this? Can I make
| any prototype defs for
I'm seconding Ime's suggestion, and adding one piece, you don't have
to use anonymous subroutines for everything..., that would be.., well,
a big pain. Named subroutines where EVERYTHING it uses is passed in
via references. Also it's return values are sent back via reference
as well.
QUESTION: But how should I transform the script, if the
anonymous subs call each other?
Very simple little example:
#!/usr/bin/perl -w
use strict;
my $i = 0;
my $a;
my $b = sub { print "$i\n"; exit if $i++ = 10; $a };
$a = sub { print "$i\n"; exit if $i++ = 10; $b };
$a;
Does that
See subject.
Hi there,
On Mon, 8 May 2000 [EMAIL PROTECTED] wrote:
I've expirienced similar problems on Solaris (2.6). After a weeks
worth of hours I feel confidant saying that the instability is from
perl 5.6.0 NOT from mod_perl(1.23)
[snip]
IMHO Solaris(2.6)Perl(5.6) just isn't fully cooked yet.
Hi,
Reading thorough this interesting posting, I want to focus back on tying
session data across a network.
We are facing a similar problem on our service, which is currently based on
a single server. We're enabled the app. so that it is mirrored on a periodic
basis across a range of servers.
I recall that files processed with require and
use are processed once (unless you use StatINC,
but that's irrelevant to my problem). Is there
a safe/efficient way to call another script from
within a mod_perl script? Or is this extremely
inefficient? My other solution would be modularize
the
On Tue, 9 May 2000, Gunther Birznieks wrote:
As far as I knew Apache::Session has never even had anything to do with
cookies. It is a persistent storage mechanism where the session "handle" is
a uniquely generated ID.
What you are interested in is a Session "manager" which understands how
I'm working on my own site with mod_perl and mason.
I want cookie exchange ONLY with one particular frame.
I *could* simply just maintain a list of pages that might
validly be in the paricular frame, but I'd prefer something
like...
Is there any method for the Apache::Request object or it's
Hi All
I have a mod_perl module in which I am trying to make use of package
globals for relatively static data. The code is in essence the following:
package Apache::repsys;
#File Apache/repsys.pm
use strict;
use Apache::Constants qw(:common);
my ($var1, $var2);
sub handler {
my $r = shift;
Peter Haworth wrote:
Drew Taylor wrote:
What I would really like is a module which subclasses Apache::Request,
and has the popup_menu, scrolling_list, and checkbox group methods
available. That way I can use the smaller (faster) Apache::Request and
still have the few HTML generation
hi,
The present system is having the following access control system.
If the request is from a perticular ip address/domain name mentioned in
config file
it will give access directly with out authenticating (like asking for user
name /password)
else it will promte for user name /password for
According to Tom Mornini:
There must be some size where
the data values are as easy to pass as the session key, and some
size where it becomes slower and more cumbersome. Has anyone
pinned down the size where a server-side lookup starts to win?
I can't imagine why anyone would pin a
On 09-May-2000 Perrin Harkins wrote:
Bill Desjardins wrote:
I checked the archives and the guide to no avail, so here goes. I am
having trouble setting a cookie in the header and then doing a
redirect. The cookies are working fine every where, but if I add a cookie
to $r-headers_out-add(),
Well, in an effort to improve my effectiveness when coding perl, I bought
"Effective Perl Programming" by Hall w/ Schwartz.
I must say, I am enjoying this book. It appears to be one of the few tech
books that I can read front to back and be engaged from start to
finish. I bought it Sunday,
I'm more concerned about dealing with large numbers of simultaneous
clients (say 20,000 who all hit at 10 AM) and I've run into problems
with both dbm and mysql where at a certain point of write activity
you basically can't keep up. These problems may be solvable but
timings just below the
Frank Mayhar wrote:
Matt Sergeant wrote:
On Sun, 7 May 2000, Frank Mayhar wrote:
Perl does have some good constructs for Web work, too. I've been writing
a webstore and some stuff is really convenient that would be inconvenient
in C. On the other hand, there's some stuff that I
Hi,
I've just finished a mod_perl mini HOWTO. It will help developers to
install mod_perl and _configure_ it. Please let me know if you have any
idea to improve this document.
http://www.insite.com.br/~nferraz/projetos/mod_perl.html
See you,
Nelson
Clients don't inform the server of what frame a click originates frame,
you'd have to have a query string or URL based session mgt setup and do it
yourself. You can direct the client what window/frame to load a response
in with a "Window-target" header but that's about all you can do. OK,
back
Well, in an effort to improve my effectiveness when coding perl, I bought
"Effective Perl Programming" by Hall w/ Schwartz.
Nah, Randal Schwartz came and taught for us at State Farm and he doesn't know
what he's talking about. He just... what? He reads this list? Oh, hi, Randal!
:)
I'm
One tiny problem...
Most of the document isn't viewable from Netscape 4.72
Nelson Correa de Toledo Ferraz wrote:
Hi,
I've just finished a mod_perl mini HOWTO. It will help developers to
install mod_perl and _configure_ it. Please let me know if you have any
idea to improve this
"J" == J J Horner [EMAIL PROTECTED] writes:
J Well, in an effort to improve my effectiveness when coding perl, I bought
J "Effective Perl Programming" by Hall w/ Schwartz.
J I give this book 4 1/2 'J's out of 5.
Thank you. I don't think Joseph reads this list, so I'll be sure to
pass it on
Drew Taylor wrote:
What I would really like is a module which subclasses Apache::Request,
and has the popup_menu, scrolling_list, and checkbox group methods
available. That way I can use the smaller (faster) Apache::Request and
still have the few HTML generation methods that I need. This
On 09-May-2000 [EMAIL PROTECTED] wrote:
I'm working on my own site with mod_perl and mason.
I want cookie exchange ONLY with one particular frame.
I *could* simply just maintain a list of pages that might
validly be in the paricular frame, but I'd prefer something
like...
Is there
-Original Message-
From: Drew Taylor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 9:08 AM
To: Peter Haworth
Cc: [EMAIL PROTECTED]
Subject: Re: Newbie Question -
Peter Haworth wrote:
Drew Taylor wrote:
What I would really like is a module which subclasses
another great one ive yet to purchase is object oriented perl
there is some sample chapters
online somewhere
"J. J. Horner" wrote:
Well, in an effort to improve my effectiveness when coding perl, I bought
"Effective Perl Programming" by Hall w/ Schwartz.
I must say, I am enjoying
On 08-May-2000 Jeff Beard wrote:
Not strange, a memory leak. You've got some bad code. If you have a program
that you've been twiddling with recently, that would be the place to start
looking.
The thing is, It's been doing this since I started coding on things...
I just clicked into a
Geoffrey Young wrote:
Drew Taylor wrote:
I'm quite sure it would be an easy write, but I just haven't done it
yet. I think once I convert my CGIs to handlers, it makes
sense to do it
then. It would be interesting to see if anyone else is interested and
work out an API for the most
On Thu, 4 May 2000, Tom Roche wrote:
I'm trying to use Devel::Symdump to document code, snip
Unfortunately Loader, or rather Perl, is having a problem with
Apache::DBI.pm. The first source file require's OK. The second
source file, GetDBs.pm, use's Apache::DBI(), line 202 of which is
) if
On Tue, 9 May 2000, Keith G. Murphy wrote:
Date: Tue, 09 May 2000 09:43:29 -0500
From: Keith G. Murphy [EMAIL PROTECTED]
To: mod_perl [EMAIL PROTECTED]
Subject: Re: OT: Re: Most nonesense I've ever read about mod_perl
Frank Mayhar wrote:
Matt Sergeant wrote:
On Sun, 7 May 2000,
Hi there,
On Tue, 9 May 2000, Leslie Mikesell wrote:
I'm more concerned about dealing with large numbers of simultaneous
clients (say 20,000 who all hit at 10 AM) and I've run into problems
with both dbm and mysql where at a certain point of write activity
you basically can't keep up.
Hmm, I may give that a try.
My main issue was all the memory it was taking 10 mod_perl process taking
up 512+ MB of memory is just not right.
I was thinking that they way I was passing the database handle $dbh between
functions was actually making a copy of the connection instead of a
are you hitting the same child process over and over again?
try starting the server in single user mode -X, and see if
you still see the same results.
cliff
Bill McCabe wrote:
Hi All
I have a mod_perl module in which I am trying to make use of package
globals for relatively static data.
not completely sure about real mod_perl. However, the following works
great using Apache::Registry and CGI:
print $query-header(-cookie=[$id_cookie,$crypt_cookie],
-Location=$query-param("redirect").'?name='.@$ref[1].'last_login='.@$ref[3].'site_id='.$query-
param('site_id'));
I think
On Tue, 9 May 2000, Jeffrey W. Baker wrote:
If you are using an RDBMS which has atomic operations, you can turn off
locking in Apache::Session with no effect.
I think every RDBMS I've seen, includig MySQL, guarantees atomicity at
this level.
On the subject of locking, I think that the daemon
Thanks, you're right. In single user mode it hit it just the once.
Bill
At 12:56 PM -0700 5/9/00, ___cliff rayman___ wrote:
are you hitting the same child process over and over again?
try starting the server in single user mode -X, and see if
you still see the same results.
cliff
Bill McCabe
I've been perusing the archives on the topic of cookie vs. url vs. user
session tracking, and I can't find a solution that is 100% effective.
Here's the scenario... using Apache::Session::DBI on a public site, where
registered users can log in to get detailed information and "place orders"
On Tue, 9 May 2000, Leslie Mikesell wrote:
We use a custom written session handler that uses Storable for
serialization. We're storing complete results for complex select
statements on pages that require "paging" so that the complex select only
happens once. We store user objects
On Tue, 9 May 2000, Wim Kerkhoff wrote:
On 09-May-2000 Perrin Harkins wrote:
On Mon, 8 May 2000, Wim Kerkhoff wrote:
On a fresh restart of apache, my processes are about 20 ~ 25 MB each,
which is about normal for mod_perl (as far as I know). However,
within a few hours (with little use
On Tue, 9 May 2000, Jay Jacobs wrote:
I'm thinking of just relying on cookies, while not 100%, it's gotta be
close to 80 or 90% which may be good for this project. But I figured
others had faced this same issue and had an ample solution...
We use in-URL session IDs for everyone, and give
Tom Mornini wrote:
On Tue, 9 May 2000, Jay Jacobs wrote:
I'm thinking of just relying on cookies, while not 100%, it's gotta be
close to 80 or 90% which may be good for this project. But I figured
others had faced this same issue and had an ample solution...
We use in-URL session
A mod_rewrite recipe wouldn't help you a lot, because you actually need to
parse the HTML, find all HREFs (and FORM actions) which point to your local
site and add the session information to these.
If you have a module which does process all the output from your handlers
then this would be a
On Tue, 9 May 2000, Drew Taylor wrote:
I'm thinking of just relying on cookies, while not 100%, it's gotta be
close to 80 or 90% which may be good for this project. But I figured
others had faced this same issue and had an ample solution...
We use in-URL session IDs for everyone,
Tom,
At 02:02 PM 5/9/00 -0700, Tom Mornini wrote:
That is the tricky part. :-)
Here's the sneaky way to handle it: Put the Session ID at the beginning of
the URI. If a request comes in with a Session ID, then strip it out of
$r-urii. If a request comes in without one, redirect them to the same
On Tue, 9 May 2000, Tobias Hoellrich wrote:
Tom,
At 02:02 PM 5/9/00 -0700, Tom Mornini wrote:
That is the tricky part. :-)
Here's the sneaky way to handle it: Put the Session ID at the beginning of
the URI. If a request comes in with a Session ID, then strip it out of
$r-urii. If a
On Tue, 9 May 2000, Jeffrey W. Baker wrote:
Why is the session ID invalid just because they left for a week? Ask them
to authenticate again and take them right back to whatever they were
doing.
On some sites bookmarking the URL with the session ID embedded is the
optimal behavior.
Jeffrey,
At 02:32 PM 5/9/00 -0700, Jeffrey W. Baker wrote:
Why is the session ID invalid just because they left for a week? Ask them
to authenticate again and take them right back to whatever they were
doing.
On some sites bookmarking the URL with the session ID embedded is the
optimal
Yes,
we use our own url-rewriting implementation of Apache::Session::DBI -
we just use method calls instead of hrefs
($ui-a_href('page.html','querystring','other stuff') ) which whop a
key=Apache::Sessionkey into the query string.
In addition, to time out sessions we added a timestamp field to
Stas, this thread is very interesting. Guide material?
Murali said:
As I understand from this discussion we have 2 methods involving creating a
session-server which will store all session data.
a) NFS mount a server which will store all session data
b) Have a DB in this server which stores this data. Through a network
connect to the DB and
On Tue, 9 May 2000, Tom Mornini wrote:
That is the tricky part. :-)
Here's the sneaky way to handle it: Put the Session ID at the beginning of
the URI. If a request comes in with a Session ID, then strip it out of
$r-urii. If a request comes in without one, redirect them to the same URI
Ari Jolma wrote:
(This may be a general Perl question but since I have this problem
only with mod_perl I'm asking it here.) Perl's (5.6.0) Configure script
puts -D_FILE_OFFSET_BITS=64 into Config.pm's variable ccflags in
my machine (redhat 6.1 with linux 2.2.12). This causes for some
reason
At 08:53 09/05/2000 -0700, Perrin Harkins wrote:
On Tue, 9 May 2000, Robin Berjon wrote:
Isn't there a work-around consisting of making 100% sure the cookie is sent
before the Location header ?
Not with MSIE. At least it didn't work for me.
Works here for me with msie 4 and 5.1 on win98.
I'm working on my own site with mod_perl and mason.
I want cookie exchange ONLY with one particular frame.
I *could* simply just maintain a list of pages that might
validly be in the paricular frame, but I'd prefer something
like...
Would putting all those pages in one directory (or
"Jeffrey W. Baker" wrote:
On Tue, 9 May 2000, Tom Mornini wrote:
The cool thing about this is that relative links need not be rewritten at
all, the browser handles it!
This last part is a great point, and one that people would do well to
heed. I hadn't considered the implication
On Tue, May 09, 2000 at 03:36:38PM -0700, Jeffrey W. Baker wrote:
The cool thing about this is that relative links need not be rewritten at
all, the browser handles it!
snip
I like to use session ids at the beginning of the URL for another
reason: the users understand it. For
On Wed, 10 May 2000, harm wrote:
On Tue, May 09, 2000 at 03:36:38PM -0700, Jeffrey W. Baker wrote:
The cool thing about this is that relative links need not be rewritten at
all, the browser handles it!
snip
I like to use session ids at the beginning of the URL for another
Rule #1: Never ever link directly to a remote site, but do it through a
redirector which makes sure that nothing that doesn't have to be sent to
the remote site gets sent to it. We use a handler that "listens" on
/redirect turns urls like:
/redirect/http://www.disney.com
to the obvious
On Tue, 9 May 2000, Alex Menendez wrote:
not completely sure about real mod_perl. However, the following works
great using Apache::Registry and CGI:
print $query-header(-cookie=[$id_cookie,$crypt_cookie],
another great one ive yet to purchase is object oriented perl
there is some sample chapters
online somewhere
See http://www.manning.com/Conway/index.html.
It really is a tremendous book. I thought I knew OO Perl pretty well, but after
reading Conway's book I realised I'd hardly
On Tue, May 09, 2000 at 04:15:29PM -0700, Tobias Hoellrich wrote:
Rule #1: Never ever link directly to a remote site, but do it through a
redirector which makes sure that nothing that doesn't have to be sent to
the remote site gets sent to it. We use a handler that "listens" on
/redirect
On Tue, 9 May 2000, Jeremy Howard wrote:
Murali said:
As I understand from this discussion we have 2 methods involving creating a
session-server which will store all session data.
a) NFS mount a server which will store all session data
b) Have a DB in this server which stores this data.
At 01:40 AM 5/10/00 +0200, harm wrote:
...
It doesn`t clear the referer header!
Any suggestions for better redirection strategies? Generate a html file
whith meta redirect="blah" qualifies as ugly ;-)
Then I guess our solution qualifies as ugly - you can spit out as many
302's as you want, it
redefined subs with perlrun?
pertinent parts, from httpd.conf:
#for running perl scripts
PerlModule Apache::PerlRun
#for running perl internally from within apache
#PerlModule Apache::Registry
ErrorDocument 401 /cgi-bin/noAccess.pl
You should be able to wrap the session creation inside an eval so that if
the session has expired, your code doesn't break, it silently creates a new
session behind the scenes.
That's if you have this requirement.
Later,
Gunther
At 04:50 PM 5/9/00 -0500, Jay Jacobs wrote:
On Tue, 9 May
Murali said:
a) NFS mount a server which will store all session data
Just a note, NFS in specific can be very problematic. It takes some real
tuning to get it just right. As for distributed data; session data ~should~
be small, under a kB. So you could move it around in almost any fassion
Lots of folks are saying the running File based sessions over NFS is
problematic. We are doing it without any noticeable issues so far but
I am _very_ curious as to what we need to watch out for. I'd like to
meet the evil before I have to do battle with it if you get my drift.
If anyone has
On Tue, 9 May 2000, Tobias Hoellrich wrote:
and what happens when somebody bookmarks a URL with the session-id
prepended and comes back a week later with an invalid session-id in the URL?
They get a screen that asks them to fix their bookmark, and shows them
how. This is the only disadvantage
On Tue, 9 May 2000, Drew Taylor wrote:
This works on my site, because the urlspace is completely
ficticious. There is no disk path /home/abcdef0987654321, in fact there
is no /home, nor even a document root at all. I just threw in the /home
to make the URL look a little more friendly.
I don't think you want to "use vars" for your regular variables. Too
dangerous, and you set yourself up for memory leaks. Declare them as
lexicals. Only use a global for something you want to cache ($dbh).
Something like:
#!/usr/bin/perl -w
# some sample code
use strict;
At 11:04 AM 5/9/00, Wim Kerkhoff wrote:
Snip [...]
Hmmm. Well, some things to look at:
globals aren't too good (i.e. use vars qw(...) ). Best to "localize" with my();
What's the SQL statement look like?
$sth-fetchrow returns an array but I don't know off the top of my head if
it
On Tue, 9 May 2000, John Armstrong wrote:
Lots of folks are saying the running File based sessions over NFS is
problematic. We are doing it without any noticeable issues so far but
I am _very_ curious as to what we need to watch out for. I'd like to
meet the evil before I have to do
Yes Jeffrey, you have railed against the netapp multiple times now.
Send me some flawless hardware, I'd appreciate it :)
The problems you describe effect all session management schemes that must
span multiple systems ( database is down, can't read sessions, requests
stack up etc ) and are not
Hi,
We're devising some training material for new people in our firm.
Can any body suggest a site which gives some decent exercises in CGI/Perl
and mod+AF8-perl. Something like a project which can be completed in 2 weeks, at
the end of which they'll have a hang of all basics. I would also like
78 matches
Mail list logo