php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26913 browscap.ini is out of date returns wrong info for IE6.0 and above
Submitted: 2004-01-14 19:31 UTC Modified: 2004-01-15 01:06 UTC
From: codeslinger at compsalot dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.3.4 OS: All
Private report: No CVE-ID: None
 [2004-01-14 19:31 UTC] codeslinger at compsalot dot com
Description:
------------
The browscap.ini file is out of date.  The highest Microsoft browser version supported is IE5.0

When it encounters IE6.0 and above it returns erronous info.  Calims it's a netsacpe 4.0 browser that does not support vbscript.

IE 6 has been available for over 1 year.  this would imply that other browsers are also out of date.

This may cause existing code to break.

Reproduce code:
---------------
   
   <?php
      echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";

      $browser = get_browser();

      foreach ($browser as $name => $value) {
         echo "<b>$name</b> $value <br />\n";
      }

   ?> 


Expected result:
----------------
correct info for IE 6.0
should be the same as for IE 5.0



Actual result:
--------------
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
--------------
browser_name_regex Mozilla/4\.0.* 
browser_name_pattern Mozilla/4.0* 
parent Netscape 4.00 
browser Netscape 
version 4.00 
majorver 4 
minorver 00 
frames 1 
tables 1 
cookies 1 
backgroundsounds 
vbscript 
javascript 1 
javaapplets 1 
activexcontrols 
beta 1 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-14 19:47 UTC] codeslinger at compsalot dot com
er, umm, did I make a bad assumption here??
I am assuming that the browscap.ini is installed by php??

But I just noticed that it is actually in the inetsrv folder.

Platform = Win98 with PWS, this is my first time installing php, so please send your flames to dev/null

Thanks,

--------
These appear to be the correct values for IE 6.0 created by a simple hack of the IE5.0 info


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 6.0
[IE 6.0]
browser=IE
Version=6.0
majorver=6
minorver=0
frames=True
tables=True
cookies=True
backgroundsounds=True
vbscript=True
javaapplets=True
javascript=True
ActiveXControls=True
Win16=False
beta=True
AK=False
SK=False
AOL=False
Update=False

[Mozilla/4.0 (compatible; MSIE 6.*; Windows 95*)]
parent=IE 6.0
platform=Win95
beta=True

[Mozilla/4.0 (compatible; MSIE 6.*; Windows 98*)]
parent=IE 6.0
platform=Win98
beta=True

[Mozilla/4.0 (compatible; MSIE 6.*; Windows NT*)]
parent=IE 6.0
platform=WinNT
beta=True

[Mozilla/4.0 (compatible; MSIE 6.*)]
parent=IE 6.0
 [2004-01-15 01:06 UTC] sniper@php.net
We no longer bundle the file. 
You need to get it yourself from:
  
    http://www.garykeith.com/browsers/downloads.asp

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC