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
 [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 Apr 18 20:01:30 2024 UTC