Help. Anything wrong with this script?

Hello,

Can somebody please tell me what is wrong with the cgi script below? I have chomd it to 755 and the script is in the cgi-bin directory. But it keeps giving the internal error message when access it.

Thank you if somebody can help.
_____________________________
#!/usr/bin/perl


use strict;
no strict 'refs';
use CGI::Carp qw(fatalsToBrowser);
use DBI;
use config;

eval "require $dataclass";
use Page;
use vars qw($page $action $temp);
$|=1;

$page=new Page;
my $user_id = $page->{form}->{uid};
my $user_name = $page->{form}->{username};
my $user_passwd = $page->{form}->{password};

if($page->{shell})
{
$action = $page->{form}->{action}
}
else
{
if($page->{form}->{login} !~ /.*register.*/ && $page->{form}->{action} ne "register")
{
if(&{"$dataclass\:\:checkUser"}($user_id , $user_passwd , $user_name , $page))
{
if(&{"$dataclass\:\:checkPassword"}($user_id , $user_passwd , $user_name , $page)
|| $page->{form}->{action} eq "admin"){
$action = $page->{form}->{action}||"step0";
}
else
{
$action= "login";
}
}
else
{
$action = "disabled";
}
}else
{
$action = "register";
}
}
$page->open("Content-type"=>($action eq "img")?"image/gif":"text/html");

handle($action);
print $page->footer();
$page->close();

$dbh->disconnect;
exit;

sub handle
{
my ($action)=@_;
return unless $action;
$page->{form}->{action}=$action;
eval "require handlers::$action;";
if($@)
{
print "$@\n";
return;
}
&$action;
}
_________________________________________

 

 

 

 

Top