PHP 4.0 Bug #4525: get_browser(); returns empty array
| From: | peterk at wfw dot wtb dot tue dot nl | Date: | Sat, 20 May 2000 11:43:37 +0000 |
| Subject: | PHP 4.0 Bug #4525: get_browser(); returns empty array | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19006@lists.php.net to get a copy of this message | ||
From: peterk@wfw.wtb.tue.nl
Operating system: Slackware Linux 7
PHP version: 4.0 Release Candidate 2
PHP Bug Type: Misbehaving function
Bug description: get_browser(); returns empty array
get_browser(); returns empty array.
function worked with 3.0.14
in php3.ini:
[browscap]
browscap = "/usr/local/apache/conf/extra/browscap.txt" ;
In script (standard example from the get_browser() man page):
<?php
function list_array( $array ) {
while ( list( $key, $value ) = each( $array ) ) {
$str .= "<b>$key:</b> $value<br>\n";
}
return $str;
}
echo "$HTTP_USER_AGENT<hr>\n";
$browser = get_browser();
echo list_array( (array) $browser );
?>
Output:
-------------------------------
Mozilla/4.72 [en] (X11; U; Linux 2.2.13 i686)
-------------------------------
0:
-------------------------------
the browscap path is correctly reported by phpinfo()
Configured with:
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.12
--with-config-file-path=/usr/local/apache/conf --enable-track-vars --with-xml
Apache has mod_perl compiled in and mod_ssl as a module.