Apache client exit signal Segmentation fault (11)
| From: | borko.net) | Date: | Sun, 10 Sep 2000 14:04:52 +0000 |
| Subject: | Apache client exit signal Segmentation fault (11) | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-db+get-2772@lists.php.net to get a copy of this message | ||
Hi, does any of you see/know why this query should cause a segmentation
fault (11) within
an Apache client process??? I have other queries using ibase_query not
causing any trouble.
The SELECT statement itself looks pretty okay. Advise me, if I am wrong here
...
<?
include("shop_config.inc.php");
$db = ibase_connect("$host:$database","$dbuser", "$dbpasswd",
"$dbcharset", "", $dbsqldlct, "$dbrole");
if( is_resource($db) ) {
$query = "SELECT p.id, p.name, p.price, b.sid, b.artno, b.numart ";
$query .= "FROM products p, basket b ";
$query .= "WHERE p.id = b.artno AND b.sid = '$sid' ";
$query .= "ORDER BY p.id ";
$result = ibase_query($db, $query); // <= this causes the segmentation
fault!
$total = "0.00";
if( is_resource($result) ) {
while( $row = ibase_fetch_row($result) ) {
$subtotal = sprintf("%0.2f",$row[5] * $row[2]);
$total = sprintf("%0.2f", $total + $subtotal);
} /* while */
} /* if */
ibase_close($db);
} /* if is_resource $db */
?>
Cheers, Arne