Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Start an Event when a Session ends
Esteemed Perl Fellows,

Is it possible to start an event when a Session ends, using Apache, mod_cgi 
and CGI::Session?

For example:

When a user enters one web page, I start one session and write a txt file. T
he txt file's name is the user's session ID. So far so good.

If I have a button or a link to exit my site, and the user clicks it, I can 
safely delete the txt file. But, if the user closes his/her browser's window
? The session is destroyed but I can't delete the file.

Any way to do this as easy as in ASP (remember the global.asa file) ?
Or any way at all?

Note: I don't have mod_perl nor Apache::ASP :(

Thanks for your time
Miguel


Report this thread to moderator Post Follow-up to this message
Old Post
Santinho
12-20-04 08:56 PM


Re: Start an Event when a Session ends
Santinho wrote:

> If I have a button or a link to exit my site, and the user clicks it,
> I can safely delete the txt file.

Only if *every* link away from your site goes through a CGI that cleans
up the session. Otherwise you won't even notice them leave.

> But, if the user closes his/her
> browser's window? The session is destroyed but I can't delete the file.

Right.

> Any way to do this as easy as in ASP (remember the global.asa file) ?

ASP can't do it either. ASP isn't magic, it's just scripting embedded in
a page - it can't tell any more than Perl can when a browser window closes.

> Or any way at all?

Easy: Just schedule a cron task that cleans up stale session files, and
does any other related housekeeping at the same time.

None of this is relevant to *any* c.l.perl.* news group, by the way. The
answer would be the same if you were using a Python script. Try
comp.infosystems.www.authoring.cgi next time.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Report this thread to moderator Post Follow-up to this message
Old Post
Sherm Pendley
12-20-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:57 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.