I get the following in my log file:
[notice] child pid xxxx exit signal Segmentation fault (11)
Occurs when I try to execute a SQL query within a perl subroutine.
Following code results in Seg fault above when refreshed a few times.
(test.asp)
<%
use strict;
use DBI;
use CGI;
my $query = new CGI;
my $dbName = "mydbname";
my $userName = 'webuser';
my $password = '';
my $sth;
my $sql;
my $rv;
my $dbh = DBI->connect("dbi:Pg:dbname=$dbName", $userName,
$password) || die "Database connection not made: $DBI::errstr";
run_sub();
sub run_sub
{
$sql = "select p.id from persons p, details d
where p.pid = 0
and d.id = p.id
order by d.dob, d.tob, d.forenames;";
$sth = $dbh->prepare($sql) || die "SQL Prepare: ($!)
SQL: ($sql)";
$rv = $sth->execute || die "SQL Execute: ($!) SQL:
($sql)";
print "$rv";
$sth->finish;
}
$dbh->disconnect;
%>
Using apache:asp 2.3.5, mod_perl 1.2.6, postgresql 7.2
Vikash
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]