Re: segfault when running header?
| From: | Chris Malton | Date: | Wed, 07 Feb 2007 19:42:29 +0000 |
| Subject: | Re: segfault when running header? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27893@lists.php.net to get a copy of this message | ||
Antony Dovgal wrote:
> > On 02/07/2007 10:18 PM, Chris Malton wrote:
>> >> The header() function currently causes a segfault with CVS head
sources.
>> >>
>> >> I'll leave this up to a dev team person to sort. I am merely testing
>> >> out php6 before a migration.
> >
> > Migration to PHP6?
> >
When it is released... of course!
This is testing server, and I'm seeing what gets broken by PHP6!
>> >> 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.
<?php
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();
}
}
?>
In php5, it works fine. PHP 6 seems to segfault on empty strings!
Chris