CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Perl

 Sometimes I can't login

Print topic Send  topic

Author Message
erick

Posts: 4
Posted: 03/06/2004, 11:15 AM

Sometimes login works, some times it doesn't , when i try to login i am redirected to the login page again and again without any error.
the system authenticate but whe try to store the values something weird happens.
I am using perl with CC 2.0
:-)
View profile  Send private message
erick

Posts: 4
Posted: 03/06/2004, 1:34 PM

Login problems in perl.


Can anyone check it for me
the function GetSessionVar in common.pm does not close the file handle ( SESSION_FILE ) leaving it opened as shown below.

sub GetSessionVar {
my ($varName) = @_;
if (-e "$temp_session_dir/$session_id.tmp") {
open(SESSION_FILE, "<$temp_session_dir/$session_id.tmp");
my ($name, $value);
while(<SESSION_FILE>) {
chomp;
($name, $value) = split(/=/);
---------> if ($name eq $varName) {return $value; } <----
}
close(SESSION_FILE);
return "";
} else {
return "";
}
}


I change the 'if ($name eq $varName) {return $value; } ' to

' if ($name eq $varName) {
close(SESSION_FILE);
return $value; }'

and login reestarted to work

can anyone check if it is a bug

thanks.....
View profile  Send private message
jscott

Posts: 2
Posted: 03/12/2004, 2:43 PM

Hmmm, first time I've used these forums, so this might be a duplicate...

Anyway, double check your permissions on the sessions_files directory. If the permissions are not correct you will get the login screen over and over, like you describe.
_________________
Jeff Scott
Tier3 Hosting and Consulting
www.tier3consulting.com
View profile  Send private message
erick

Posts: 4
Posted: 03/12/2004, 3:01 PM

I check permissions and it was fine.
Kind Regards...
Erick RIbeiro.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.