Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27895 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91573 invoked by uid 1010); 7 Feb 2007 20:18:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91558 invoked from network); 7 Feb 2007 20:18:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2007 20:18:01 -0000 X-Host-Fingerprint: 84.64.166.162 user-5440a6a2.wfd76a.dsl.pol.co.uk Received: from [84.64.166.162] ([84.64.166.162:9787] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/C0-18288-9F33AC54 for ; Wed, 07 Feb 2007 15:18:01 -0500 Message-ID: <0C.C0.18288.9F33AC54@pb1.pair.com> To: internals@lists.php.net Date: Wed, 07 Feb 2007 20:16:48 +0000 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 References: <11.CC.18288.3462AC54@pb1.pair.com> <45CA29B3.7020705@zend.com> <45CA2B81.30600@cjsoftuk.dyndns.org> <45CA2F38.3070106@zend.com> In-Reply-To: <45CA2F38.3070106@zend.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 84.64.166.162 Subject: Re: [PHP-DEV] segfault when running strpos (was header)! From: chrism@cjsoftuk.dyndns.org (Chris Malton) Antony Dovgal wrote: > On 02/07/2007 10:41 PM, Chris wrote: >>>> Need any more info? Give me a buzz. >>> >>> A reproduce case? >>> >> >> WHOOPS - Turns out it isn't header that breaks it! >> >> The following code breaks php6 at the cmd line. >> >> > if($_GET["ffcheck"]==""){ >> $ua=$_SERVER['HTTP_USER_AGENT']; >> if(strpos($ua,"MSIE")!==false){ *segfaults HERE* >> //USER AGENT = MSIE! >> header("Location: http://shared.cjsoftuk.dyndns.org/Firefox.php?URL=" >> . urlencode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] >> . "?" . $_SERVER["QUERY_STRING"])); >> exit(); >> } >> } >> ?> > > Could you please provide a short but complete reproduce case, so I can > just copy/paste it and reproduce the problem. > With this code I can see only "Notice: Undefined index: ffcheck in ..", > but no segfault. > > Thank you. > Please see below for a term session: root@SERVER:~/php6# cat /srv/www/include/firefox.inc root@SERVER:~/php6# php6 /srv/www/include/firefox.inc Segmentation fault (I know I shouldn't be root, but anyway it's over LAN). See my point? Chris