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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 - 9 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-22 11:30 UTC] derick@php.net
Duplicate of #28485
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 09:01:28 2024 UTC