php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8598 get_browser crashing
Submitted: 2001-01-08 13:46 UTC Modified: 2001-01-08 15:15 UTC
From: lsimon at Assigned: stas (profile)
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.4 OS: Linux Debian 2.2.17
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lsimon at
New email:
PHP Version: OS:

 

 [2001-01-08 13:46 UTC] lsimon at
The docuementation get_browser function and script causes segmentation fault. I saw the earlier reports on this, but as I'm not using 4.04 I figured this bug had been squashed. If the fix is still only available in CVS then I'm sorry for this. 

gdb bt:
#0  0x0 in ?? ()
#1  0x80e8d1d in zend_hash_find (ht=0x81bd500, 
    arKey=0x8270484 "Mozilla/4.72 [en] (X11; I; Linux 2.2.17 i586; Nav)", 
    nKeyLength=51, pData=0xbfffd484) at zend_hash.c:854
#2  0x80a2dd9 in php_if_get_browser (ht=1, return_value=0x8275b8c, 
    this_ptr=0x0, return_value_used=1) at browscap.c:222
#3  0x810c35f in execute (op_array=0x827607c) at ./zend_execute.c:1519
#4  0x810e440 in execute (op_array=0x82714dc) at ./zend_execute.c:2063
#5  0x80e5a2b in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#6  0x808a604 in php_execute_script (primary_file=0xbffff988) at main.c:1221
#7  0x80f14ab in apache_php_module_main (r=0x826cd44, display_source_mode=0)
    at sapi_apache.c:89
#8  0x8087f26 in send_php ()
#9  0x8087f5a in send_parsed_php ()
#10 0x812f9d9 in ap_invoke_handler ()
#11 0x8143d8f in process_request_internal ()
#12 0x8143df6 in ap_process_request ()
#13 0x813aff6 in child_main ()
#14 0x813b1b1 in make_child ()
#15 0x813b32c in startup_children ()
#16 0x813b98d in standalone_main ()
#17 0x813c1bc in main ()
#18 0x401c3a52 in __libc_start_main () from /lib/libc.so.6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 13:49 UTC] stas@php.net
Which browscap.ini are you using?
 [2001-01-08 14:08 UTC] lsimon at
The latest from the Browserhawk site. 

my user agent as variable is Mozilla/4.72 [en] (X11; I; Linux 2.2.17 i586; Nav)

; browscap.ini
; 
;          Version: 2.5
;     Last updated: February 2000
; More information: cyScape, Inc. (http://www.cyscape.com)
 [2001-01-08 14:19 UTC] lsimon at
The latest from the Browserhawk site. 

my user agent as variable is Mozilla/4.72 [en] (X11; I; Linux 2.2.17 i586; Nav)

; browscap.ini
; 
;          Version: 2.5
;     Last updated: February 2000
; More information: cyScape, Inc. (http://www.cyscape.com)
 [2001-01-08 14:29 UTC] stas@php.net
I see nothing like browscap.ini on browsehawk site. Can you
give a pointer?
 [2001-01-08 14:44 UTC] lsimon at
http://www.browserhawk.com/browscap/

This is the site recommended in the FAQ for obtaining a browscap.ini
 [2001-01-08 14:57 UTC] lsimon at
Incidentally, I cannot find my browser in the browscap.ini file I have. But supposing someone's browser is not in that file, I suspect that we still don't want php to segfault. Is there a better place to find a browscap.ini that you know of? You'd think that Mozilla/4.72 would be in the list I have, but alas. 
 [2001-01-08 15:09 UTC] stas@php.net
There are some bugs there indeed, I'm working on it.
 [2001-01-08 15:15 UTC] stas@php.net
Please try current CVS - it should work now. If not, please
reopen.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 20:01:35 2025 UTC