php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28486 browscap ini directive not set
Submitted: 2004-05-22 09:00 UTC Modified: 2004-05-22 11:30 UTC
From: wcucn at hotmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.0.0RC2 OS: WindowsXP
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: wcucn at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-05-22 09:00 UTC] wcucn at hotmail dot com
Description:
------------
I works on php 4 while I used

[browscap]
browscap = browscap.ini

and put the browscap.ini to the php directory

however, it does not work in php 5 with the message below

Warning: get_browser() [function.get-browser]: browscap ini directive not set. in d:\Apache\htdocs\curtis\agent.php on line 2

Reproduce code:
---------------
The testing code is below
<?
$_SERVER['HTTP_USER_AGENT']=get_browser();

foreach($_SERVER['HTTP_USER_AGENT'] as $name=>$value){
	echo"<b>$name</b> $value <br />\n";
}

if($_SERVER['HTTP_USER_AGENT']->javascript==1){
	echo"javascript enabled";
}
else{
	echo"javascript disabled";
}
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-22 11:30 UTC] derick@php.net
Duplicate of #28485
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 22:01:36 2025 UTC