#35710 [NEW]: get_browser returns false
From: mike at blueroot dot co dot uk
Operating system: Linux
PHP version: 5.1.1
PHP Bug Type: Unknown/Other Function
Bug description: get_browser returns false
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 bug report at http://bugs.php.net/?id=35710&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35710&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35710&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35710&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35710&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35710&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35710&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35710&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35710&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35710&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35710&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35710&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35710&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35710&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35710&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35710&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35710&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35710&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35710&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35710&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35710&r=mysqlcfg
Thread (5 messages)
- mike at blueroot dot co dot uk