php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21443 get_browser still has problems with browsecap.ini from www.garykeith.com
Submitted: 2003-01-05 15:29 UTC Modified: 2003-01-06 15:44 UTC
From: serge at planetcharters dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
 [2003-01-05 15:29 UTC] serge at planetcharters dot com
PHP does not detect Netscape for Windows ua: Mozilla/4.8 [en] (Windows NT 5.0; U) It did detect Mozilla 1.2 and IE 6 for Windows and Mozilla 1.1 and Netscape 4.7 in Linux.

The latest verion (downloaded January 5 2003) of browsecap.ini was used.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 15:41 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Contact the developer mantaining the browsecap.ini, this is not a PHP bug.
 [2003-01-05 21:49 UTC] gary at garykeith dot com
Ilia, I am the developer of the browscap.ini file that PHP recommends to its users. Respectfully, this issue does appear to be a bug in PHP. The user agent in question, Mozilla/4.8 [en] (Windows NT 5.0; U), is in my browscap.ini file and it is recognized when Serge visits my website which uses IIS. To me that suggests a bug in get_browser().

I am suspicious that in certain situations get_browser() has a problem dealing with multiple question marks in a user agent. In an attempt to prove my theory I changed the definition for the user agent in question and asked Serge to see if it works. I'll report back here on his results.
 [2003-01-05 22:25 UTC] serge at planetcharters dot com
I updated the browscap.ini and the detection works fine now with Netscape for windows:

ua: Mozilla/4.8 [en] (Windows NT 5.0; U)
pattern match: browser_name_pattern Mozilla/4\.8.*(Windows NT 5\.0; U)
 [2003-01-05 22:38 UTC] gary at garykeith dot com
Thanks, Serge.

Ilia, I think this is fairly solid proof that my suspicions are correct about get_browser() having a problem dealing with multiple question marks in the user agent.

The old definition in my browscap.ini file: Mozilla/4.8 ???? (Windows NT 5.0; U) fails while the updated definition: Mozilla/4.8*(Windows NT 5.0; U) works fine.

Both definitions work fine with browscap.dll therefore I suspect a problem with get_browser().
 [2003-01-06 15:44 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC