#19902 [Bgs]: browscap.ini parsing error
| From: | juri at ria dot com | Date: | Tue, 15 Oct 2002 00:24:52 +0000 |
| Subject: | #19902 [Bgs]: browscap.ini parsing error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22415@lists.php.net to get a copy of this message | ||
ID: 19902
User updated by: juri@ria.com
Reported By: juri@ria.com
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: All Win
PHP Version: 4.2.3
New Comment:
Hello Iliaa
Why do you release a browscap.ini with invalid entries with every new
distribution of PHP?
Everybody using browscap.ini is forced to edit it, before he may use
it. Cumbersom...
Kind regards
Juri
Previous Comments:
------------------------------------------------------------------------
[2002-10-14 18:54:22] iliaa@php.net
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.
------------------------------------------------------------------------
[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