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

2005-12-16 Thread sniper
 ID:   35710
 Updated by:   [EMAIL PROTECTED]
 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:

I meant bug #27372 which is the root issue.



Previous Comments:


[2005-12-16 16:47:44] mike at blueroot dot co dot uk

open



[2005-12-16 16:46:10] mike at blueroot dot co dot uk

Do you mean bug #8419?

I thought this bug report was a little old to be re-opening (it is from
2000!).  I think its unlikely that a bug that affected php 4.0.1 would
still be valid in 2005 got php 5.1.1 (and 5.0.4).

The 'resolution' for that bug was also vague.

"Please try current CVS, it has browscap behaviour fixed. If
it still fails, please repoen and provide your bworscap.ini
file (or where I can get the same one)."

I have searched for other bugs relating to get_browser and nothing is
the same as this one, except for this relic.

Maybe you can add a note for this bug to say which the duplicate is and
also maybe point towards the solution (#8419 certainly doesnt help)



[2005-12-16 16:33:37] [EMAIL PROTECTED]

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.





[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')))."";

$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


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

2005-12-16 Thread sniper
 ID:   35710
 Updated by:   [EMAIL PROTECTED]
 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')))."";

$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