Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using session managment in perl

0 views
Skip to first unread message

madan

unread,
Jul 25, 2006, 4:56:01 AM7/25/06
to
hi all,
i have created a user screen which when one logs in can access some
applications and logs out..
but my problem is when i press back button on my browser i am going
back to my user page..this should not happen..i must get a error
message that u are logged out or login screen must appear...
can any one please guide me how should i approch for such kind of
conditions..
thanks in advance
madan chowdary

rajeev....@gmail.com

unread,
Jul 25, 2006, 9:08:51 AM7/25/06
to
why dont u use cookies?

narra...@gmail.com

unread,
Jul 25, 2006, 9:37:48 AM7/25/06
to
yep...i want to create sessions rether than going for cookies...

A. Sinan Unur

unread,
Jul 25, 2006, 10:16:27 AM7/25/06
to
narra...@gmail.com wrote in news:1153834667.772755.248810
@p79g2000cwp.googlegroups.com:

> yep...i want to create sessions rether than going for cookies...

What does that even mean?

Please quote an appropriate amount of context.

* Cookies and session management go hand in hand in most cases.

* CGI questions are off-topic in this newsgroup. Methods for managing CGI
sessions are independent of the particular language used to implement them,
and should be discussed in a CGI group.

* On the other hand, if you have some Perl code that is, say, using
CGI::Session, and is not behaving as you expect, then by all means, ask a
specific question, *AFTER* reading the posting guidelines for this group.

Sinan

Gunnar Hjalmarsson

unread,
Jul 25, 2006, 12:21:42 PM7/25/06
to
A. Sinan Unur wrote:
> * CGI questions are off-topic in this newsgroup.

Only if they have no Perl content.

> Methods for managing CGI
> sessions are independent of the particular language used to implement them,
> and should be discussed in a CGI group.

How to do it in Perl is well as on-topic here as are e.g.
- how to send emails using Perl,
- how to access a database using Perl, or
- how to parse a text file using Perl.

> * On the other hand, if you have some Perl code that is, say, using
> CGI::Session, and is not behaving as you expect, then by all means, ask a
> specific question, *AFTER* reading the posting guidelines for this group.

Precisely.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

A. Sinan Unur

unread,
Jul 25, 2006, 1:14:23 PM7/25/06
to
Gunnar Hjalmarsson <nor...@gunnar.cc> wrote in
news:4imuqmF...@individual.net:

> A. Sinan Unur wrote:
>> * CGI questions are off-topic in this newsgroup.
>
> Only if they have no Perl content.

There was no Perl content in the OP:

http://groups.google.com/group/comp.lang.perl.misc/msg/c81bcc45d6684b5b

Sinan

Gunnar Hjalmarsson

unread,
Jul 25, 2006, 1:38:28 PM7/25/06
to

True, but that does not make the above unqualified statement correct.

A. Sinan Unur

unread,
Jul 25, 2006, 2:57:35 PM7/25/06
to
Gunnar Hjalmarsson <nor...@gunnar.cc> wrote in news:4in3alF4clkvU1
@individual.net:

> A. Sinan Unur wrote:
>> Gunnar Hjalmarsson <nor...@gunnar.cc> wrote in
>> news:4imuqmF...@individual.net:
>>>A. Sinan Unur wrote:
>>>>
>>>>* CGI questions are off-topic in this newsgroup.
>>>
>>>Only if they have no Perl content.
>>
>> There was no Perl content in the OP:
>>
>> http://groups.google.com/group/comp.lang.perl.misc/msg/c81bcc45d6684b5b
>
> True, but that does not make the above unqualified statement correct.
>

No, but the rest of the message explained what to do to make the post
topical. I did not see the point of your correction, especially given that
I stated, in the same post:

On the other hand, if you have some Perl code that is, say, using
CGI::Session, and is not behaving as you expect, then by all means,
ask a specific question, *AFTER* reading the posting guidelines for
this group.


I still do not see the point of your correction. Not every fact needs to be
mentioned in the same sentence, and, overall, my response did convey the
fact that Perl questions might have something to do with CGI are not ruled
out, just CGI questions that have no Perl content.

I am going to stop now.

Sinan

Gunnar Hjalmarsson

unread,
Jul 25, 2006, 5:10:30 PM7/25/06
to
A. Sinan Unur wrote:

> Gunnar Hjalmarsson wrote:
>>A. Sinan Unur wrote:
>>>Gunnar Hjalmarsson wrote:
>>>>A. Sinan Unur wrote:
>>>>>* CGI questions are off-topic in this newsgroup.
>>>>
>>>>Only if they have no Perl content.
>>>
>>>There was no Perl content in the OP:
>>>
>>>http://groups.google.com/group/comp.lang.perl.misc/msg/c81bcc45d6684b5b
>>
>>True, but that does not make the above unqualified statement correct.
>
> No, but the rest of the message explained what to do to make the post
> topical. I did not see the point of your correction,

Maybe I'm oversensitive...

> my response did convey the
> fact that Perl questions might have something to do with CGI are not ruled
> out, just CGI questions that have no Perl content.

Unfortunately, that's not an undisputed fact. I often see remarks here,
apparently with the aim to discourage people from posting anything CGI
related. That's the reason for my oversensitiveness.

OTOH, you often post helpful replies to CGI related Perl questions, so
it was kind of unfair to 'pick' on you. Sorry about that. ;-)

A. Sinan Unur

unread,
Jul 25, 2006, 5:49:32 PM7/25/06
to
Gunnar Hjalmarsson <nor...@gunnar.cc> wrote in
news:4info7F...@individual.net:

> A. Sinan Unur wrote:

[ back and forth argument snipped ;-) ]

>> my response did convey the
>> fact that Perl questions might have something to do with CGI are not
>> ruled out, just CGI questions that have no Perl content.
>
> Unfortunately, that's not an undisputed fact. I often see remarks
> here, apparently with the aim to discourage people from posting
> anything CGI related. That's the reason for my oversensitiveness.

Understood. I think we both agree that it is unfortunate when legitimate
Perl questions that are related to CGI are considered off-topic.

> OTOH, you often post helpful replies to CGI related Perl questions, so
> it was kind of unfair to 'pick' on you. Sorry about that. ;-)

No need to apologize. We both stated our positions, and re-reading my
posts, I think I might be the oversensitive one ;-)

Sinan
--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

madan

unread,
Jul 26, 2006, 12:19:02 AM7/26/06
to
guyz please...

i was just asking for help from u but not to argue that the message is
totally out of subject from this group....

the main thing is i am doing on perl as well as CGI....

think CGI.pm is part of perl and how does that move away from this
group topic....

if at all u know the logic please do post ...but dont just say its
totally junk for this group..

k..i am using perl 5.6 on windows using apache server....

i need to create sessions but not using cookies...

please help me on this how to go with it...

thanks in advance..

madan

Gunnar Hjalmarsson

unread,
Jul 26, 2006, 6:31:56 AM7/26/06
to
madan wrote:
> think CGI.pm is part of perl and how does that move away from this
> group topic....

It doesn't. But discussing alternative techniques for session management
is off-topic. (One appropriate group for such a discussion is
comp.infosystems.www.authoring.cgi.)

Helping out to code it in Perl would be on-topic, though.

> if at all u know the logic please do post

As Sinan explained, cookies are typically used for session management.
There are CPAN modules available for such solutions.

> i need to create sessions but not using cookies...

[OT: Then you can use hidden form fields.]

Please feel free to come back if you would encounter difficulties when
coding whatever route you decide to go. But first, please study and
follow the clpmisc posting guidelines:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

Mumia W.

unread,
Jul 26, 2006, 7:27:07 AM7/26/06
to
On 07/25/2006 11:19 PM, madan wrote:
> [...]

> i need to create sessions but not using cookies...
> [...]

Sorry, you'll almost certainly have to use at least one cookie
for sessions to work[0].

These modules may help you with sessions:
CGI::Session
Storable
FreezeThaw
Data::Dumper

--
[0] Unless you use URL session id's--very complicated.


Ted Zlatanov

unread,
Jul 26, 2006, 10:43:17 AM7/26/06
to
On 26 Jul 2006, madan...@gmail.com wrote:

> k..i am using perl 5.6 on windows using apache server....
>
> i need to create sessions but not using cookies...

I think you should look at the HTTP specification. You'll see why
session management without cookies is very difficult - HTTP is a
stateless (mostly) protocol. Perl has lots of ways to deal with
cookies, and you'll have to learn them. If you are under Apache and
just starting to write your code, you can also consider mod_perl,
which usually has better performance, and has built-in facilities for
a lot of the session management. If your code is mostly written
already, it may be difficult to move it to mod_perl if you don't have
a lot of Perl experience.

Ted

Ben Morrow

unread,
Jul 26, 2006, 12:30:51 AM7/26/06
to

Quoth "madan" <madan...@gmail.com>:
<snip illiterate wibble>

Please stop changing your From: address.

Ben

--
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
benm...@tiscali.co.uk Groucho Marx

Tad McClellan

unread,
Jul 26, 2006, 3:44:01 PM7/26/06
to
madan <madan...@gmail.com> wrote:
> guyz please...
>
> i was just asking for help from u but not to argue


Please choose one posting address and stick with it.

It is difficult to killfile your moving target.

Thank you.


> if at all u know the logic please do post ...but dont just say its
> totally junk for this group..


It's totally junk for this group.

(I don't take direction very well.)


--
Tad McClellan SGML consulting
ta...@augustmail.com Perl programming
Fort Worth, Texas

0 new messages