For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > September 2004 > Apache::Session Error Handling.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Apache::Session Error Handling.
Sara

2004-09-23, 3:55 am

Wondering how I can show custom error message if session file doesn' exist.

http://search.cpan.org/~cwest/Apach...Session/File.pm

If session file doesn't exist:

using CGI::Carp qw(fatalsToBrowser);

Software error:
Object does not exist in the data store at /usr/share/perl5/Apache/Session/Store/File.pm line 90.Is there a way that I can use:|| die "Sorry, your session has expired $!";if yes, where I can use it in the code? or should I validate file existance separately? (-f, $id)? ########################################
####use Apache::Session::File;

tie %hash, 'Apache::Session::File', $id, {
Directory => '/tmp/sessions',
LockDirectory => '/var/lock/sessions',
};######################################
#####Thanks for any input.Sara.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com