#35710 [Opn->Bgs]: get_browser returns false

From: Date: Fri, 16 Dec 2005 15:33:40 +0000
Subject: #35710 [Opn->Bgs]: get_browser returns false
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90551@lists.php.net to get a copy of this message
ID: 35710 Updated by: sniper@php.net Reported By: mike at blueroot dot co dot uk -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 5.1.1 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2005-12-16 16:25:14] mike at blueroot dot co dot uk Description: ------------ get_browser() returns false when given valid parameters. browscap.ini is the latest downloaded from http://www.garykeith.com/browsers/downloads.asp browscap is set correctly in php.ini and shows in phpinfo() Reproduce code: --------------- echo count(file(ini_get('browscap')))."<br><br>"; $browser = get_browser('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3', true); var_dump($browser); The first line shows that the browscap.ini file is being read properly # wc -l /php5/lib/browscap.ini 14296 /php5/lib/browscap.ini Expected result: ---------------- 14296 Array ( [browser_name_regex] => ^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:.*) gecko/.* firefox/0\.9.*$ [browser_name_pattern] => Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:*) Gecko/* Firefox/0.9* [parent] => Firefox 0.9 [platform] => WinXP [browser] => Firefox [version] => 0.9 [majorver] => 0 [minorver] => 9 [css] => 2 [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [vbscript] => [javascript] => 1 [javaapplets] => 1 [activexcontrols] => [cdf] => [aol] => [beta] => 1 [win16] => [crawler] => [stripper] => [wap] => [netclr] => ) Actual result: -------------- 14296 bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35710&edit=1

« previous php.bugs (#90551) next »