WIthout seeing either your (relevant, short) Perl code nor the SQL you're issuing against your table, it's hard to tell what the actual problem might be. Also, the contents of your webserver error log might help us help you better by giving us some more diagnostics.
| [reply] |
Sorry! This is some test code. If the table dont have any data, this sub doesn't work, my perl page is not response anything, my browser => "Waiting for localhost..." forever !!! So i cant see any error.
sub checkGroupExist
{
eval{$mysql=Net::MySQL->new(hostname=>"localhost",database=>"check
+k",user=>"root",password=>"pw")};
my ($grname)=@_;
if(!$@)
{
$mysql->query(qq{Select GROUP_NAME from PROJECT_GROUP where GR
+OUP_NAME='$grname'});
my $record_set=$mysql->create_record_iterator();
my $record=$record_set->each();
if($record)
{
return 1;
}
$mysql->close();
}
else
{
print qq{Can't connect to database. Check your config in 'conf
+ig.pl'};
exit;
}
return 0;
}
I see when a perl page run in the browser, there is a program 'perl.exe' in my Window Task Manager. The page load completely and this programe disappear.
With my error, is see in my Task Manager have a task with name 'perl.exe' and it's never disappear. I refresh the page and i have one more!!! | [reply] [d/l] |
Maybe you should remove the CGI part then, and debug the SQL part alone. I don't see anything obvious why your code should fail or enter a long loop. But as you haven't shown a self-contained example, it's hard to tell.
| [reply] |