I was making the changes to my auth.pl file from this FAQ:
http://webmagic.hypermart.net/dbman/db/dbfaq.cgi?db=dbmanfaq&uid=wdu2002.102400223849656&sb=7&so=ascend&Validated=Yes&view_records=1&Validated=Yes&keyword=cookie&view_records=Search+Records&nh=5&mh=1
and I received a syntax error, but dont know how to fix it.
The line it references is, is the @perm = ; line. Tells me there is a problem with it, but I copied and pasted from the FAQ, so I dont know what the problem is. Anyone know?
Here is the code I have:
&GetCookies('session');
if (length($Cookies{'session'}) > 4) {
$db_uid = $Cookies{'session'};
if (-e "$auth_dir/$db_uid") {
open(AUTH, "<$auth_dir/$db_uid") or &cgierr("unable to open auth file: $auth_dir/$uid. Reason: $!\n");
@perm = ;
close AUTH;
($view, $add, $del, $mod, $mem, $admin, $max_record, $host) = split (/:/, @perm[0]);
return ('ok', $db_uid, $view, $add, $del, $mod, $mem, $admin, $max_record); }
else { return ('invalid/expired user session'); }
}
else { return 'no login'; }
}
http://webmagic.hypermart.net/dbman/db/dbfaq.cgi?db=dbmanfaq&uid=wdu2002.102400223849656&sb=7&so=ascend&Validated=Yes&view_records=1&Validated=Yes&keyword=cookie&view_records=Search+Records&nh=5&mh=1
and I received a syntax error, but dont know how to fix it.
The line it references is, is the @perm = ; line. Tells me there is a problem with it, but I copied and pasted from the FAQ, so I dont know what the problem is. Anyone know?
Here is the code I have:
Code:
else { # Session Cookie Mod &GetCookies('session');
if (length($Cookies{'session'}) > 4) {
$db_uid = $Cookies{'session'};
if (-e "$auth_dir/$db_uid") {
open(AUTH, "<$auth_dir/$db_uid") or &cgierr("unable to open auth file: $auth_dir/$uid. Reason: $!\n");
@perm = ;
close AUTH;
($view, $add, $del, $mod, $mem, $admin, $max_record, $host) = split (/:/, @perm[0]);
return ('ok', $db_uid, $view, $add, $del, $mod, $mem, $admin, $max_record); }
else { return ('invalid/expired user session'); }
}
else { return 'no login'; }
}