|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-02-23 17:22 UTC] php-bug-27372 at ryandesign dot com
Description: ------------ When Apache starts with a new version of Gary Keith's browscap.ini, PHP reports an error: PHP: Error parsing /Library/WebServer/browscap.ini on line 711 Line 711 reads: browser=Yahoo! Slurp Seems PHP's ini-file reading routine does not like the bang in the browser name? Reproduce code: --------------- Download the 2/23/2004 or later browscap.ini (or download and unpack browscap.zip) from www.garykeith.com. Configure php.ini to point to this file. Stop and restart Apache. Expected result: ---------------- PHP should read in and accept the file without error. Actual result: -------------- PHP reports an error during Apache startup. All browscap.ini entries before line 711 are loaded. All entries after that are not. Since browscap.ini is currently 18682 lines long, this means most entries are not loaded. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 14:00:01 2025 UTC |
Placing those values inside double quotes (") would fix it.. But as I guess that's not an option we have to fix the parser..for php.ini, ! is special.. Maybe the best way to fix this is to have separate scanner/parser for browscap.ini..Gary Keith has already (2004-10-02) kindly modified his browscap.ini in order to prevent a specific crash about the Nutch browser. But the browscap parser should anyway include a security: when one assign a parent to the same parent in browscap.ini, there is an infinite loop that should be prevented. Example in browscap.ini: [Nutch] parent=Nutch Then in a PHP script: $browser=get_browser('Nutch'); Effect: Infinite loop that takes 100% CPU forever.