what is the reasonable thing to with a segfault in php?

From: Date: Thu, 15 Apr 2004 10:29:12 +0000
Subject: what is the reasonable thing to with a segfault in php?
Groups: php.internals 
Request: Send a blank email to internals+get-9168@lists.php.net to get a copy of this message
Hi, I've got a situation where a seemingly innocent statement produces a segfault. I've tried reducing it to a single reproducable testcase, but without success. The problem is however solidly reproducable in the context in which it occurs. I'm *certain* it is caused by a mistake in *my* code, but I feel it isn't exactly appropriate for php to segfault because of a user error? Very briefly, this is an excerpt where the segfault occurs: <h2><?php print $_SESSION['customers'][$customer]; ?></h2> <?php $q="<longish SELECT query>"; $result=mysql_query( $q ) or die("mysql:".mysql_error()); $main_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $q="<longish SELECT query>"; $result=mysql_query( $q ) or die(mysql_error()); $billing_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $q="<longish SELECT query>"; $result=mysql_query( $q ) or die(mysql_error()); $technical_address=mysql_fetch_array( $result, MYSQL_ASSOC ); $editmain=strcasecmp($_REQUEST['contact'],"main")==0; //$editbilling=strcasecmp($_REQUEST['contact'],"billing")==0; //$edittechnical=strcasecmp($_REQUEST['contact'],"technical")==0; ?> If I uncomment either of the last 2 commented-out statements, I get a segfault. I'm using php 4.3.4 and apache 2.0.49 on linux 2.4.24. mysql is 4.0.15. /Per Jessen, Zurich

« previous php.internals (#9168) next »