#19902 [Opn->Bgs]: browscap.ini parsing error
ID: 19902
Updated by: iliaa@php.net
Reported By: juri@ria.com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: All Win
PHP Version: 4.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The browscap.ini sometimes contains not valid entries not supported by
PHP's ini parser. Simply remove those lines, there are usually very few
of those.
Previous Comments:
------------------------------------------------------------------------
[2002-10-14 10:38:13] juri@ria.com
Hello Bug Report reader.
<?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);
?>
The browser information will be output together with the following
message appended:
PHP: Error parsing [drive]:\[path]\browscap.ini on line 8206
browscap.ini at line position 8206 reads:
browser=AE/2.1(Linux)
Changing "AE/2.1(Linux)" to "AE/2.1 Linux" solves the parsing error.
The parsing procedure seems to "dislike" brackets [(,)].
This problem is quite old, but still persists with PHP 4.2.3.
Suggestion: Update browscap.ini for PHP distributions accordingly.
Kind regards
Juri
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19902&edit=1
Thread (8 messages)