PHP 4.0 Bug #4787: get_browser() still segments
| From: | liz at xcalibur dot co dot uk | Date: | Fri, 02 Jun 2000 19:31:48 +0000 |
| Subject: | PHP 4.0 Bug #4787: get_browser() still segments | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20090@lists.php.net to get a copy of this message | ||
From: liz@xcalibur.co.uk
Operating system: Slackware 7
PHP version: 4.0.0 Release
PHP Bug Type: Reproduceable crash
Bug description: get_browser() still segments
I have compiled PHP with
./configure' '--width-apache=/usr/src/apache-3.1.12' '--with-mysql'
'--enable-track-vars' '--disable-debug' '--enable-calendar'
'--enable-dbase' '--enable-ftp' '--enable-trans-sid'
'--enable-inline-optimization' '--enable-discard-path'
I have tried every which way but loose to get this to work, even tried compiling up a CGI version.
(as above but without apache)
OK, when I run it as a module, using the code for the get_browser() in the helpfile on here aka
<?php
function list_array( $browser ) {
while ( list( $key, $value ) = each( $browser ) ) {
$str .= "<b>$key:</b> $value<br>\n";
}
return $str;
}
echo "$HTTP_USER_AGENT<hr>\n";
$browser = get_browser();
echo list_array( (array) $browser );
?>
All I get is
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
--------------------------------------------------------------------------------
0:
Whatever the browser/os is, I downloaded the browser.ini file from cyberscap I think - whereever it
was PHP suggested, and I know its reading it, as if I break the ini file by making false entries it
tells me - I checked that much
The CGI version does a segmentation fault.
A working example is on http://www.xcalibur.co.uk/browser.html
It also did it with
./configure' '--width-apache=/usr/src/apache-3.1.12'