Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9170 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20699 invoked by uid 1010); 15 Apr 2004 10:57:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20637 invoked from network); 15 Apr 2004 10:57:03 -0000 Received: from unknown (HELO is.magroup.ru) (213.33.179.242) by pb1.pair.com with SMTP; 15 Apr 2004 10:57:03 -0000 Received: from localhost.localdomain ([192.168.3.226]) by is.magroup.ru with Microsoft SMTPSVC(5.0.2195.6713); Thu, 15 Apr 2004 14:57:16 +0400 Date: Thu, 15 Apr 2004 14:57:16 +0400 To: internals@lists.php.net Message-ID: <20040415145716.2e263a0f.tony2001@phpclub.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.10cvs7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Apr 2004 10:57:16.0836 (UTC) FILETIME=[6A815E40:01C422D8] Subject: Re: [PHP-DEV] what is the reasonable thing to with a segfault in php? From: tony2001@phpclub.net (Antony Dovgal) On Thu, 15 Apr 2004 12:44:20 +0200 Per Jessen wrote: > Per Jessen wrote: > > > > > $editmain=strcasecmp($_REQUEST['contact'],"main")==0; > > //$editbilling=strcasecmp($_REQUEST['contact'],"billing")==0; > > //$edittechnical=strcasecmp($_REQUEST['contact'],"technical")==0; > > > > OK, > I've now guarded the above with : > > if ( isset($_REQUEST['contact']) ) > { > $editmain=strcmp($_REQUEST['contact'],"main")==0; > $editbilling=strcmp($_REQUEST['contact'],"billing")==0; > $edittechnical=strcasecmp($_REQUEST['contact'],"technical")==0; > } > > and the segfault is gone. Still, a segfault just because I'm using an unset > global? And why only on the 2nd or later statement? > Read this first: http://bugs.php.net/how-to-report.php Try a CVS snapshot and generate a backtrace - this would help more than your code. --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com