From: little_miss_goth at hotmail dot com Operating system: Linux(/others?) PHP version: 4.3.4 PHP Bug Type: *General Issues Bug description: Similar problems to #27291 when using parse_ini_file() NOT get_browser()
Description: ------------ I'm using the parse_ini_file() function as the basis for a reimplementation of get_browser(). I'm having to process browscap.ini without using the get_browser() function as the hosting people I'm using won't set the browscap path in php.ini. Until fairly recently this was working fine. I'm receiving parse errors on the browscap.ini against the "browser=Yahoo! Slurp" line, the same as Gary Keith mentions in one of his comments in Bug #27291 [get_browser matches browscap.ini patterns incorrectly]. The browscap.ini section that causes this reads: [Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)] parent=Yahoo browser=Yahoo! Slurp >From the ChangeLog and #27291's comment listing, issues with get_browser() have apparently been fixed in 4.3.5. However, I'm not using get_browser(), and so I was wondering if the fix implemented for that will also remedy the parse_ini_file() issue? For example, does get_browser() call parse_ini_file() [or does the engine do something along those lines]? Oh, BTW, editting the browscap.ini manually so that "browser=Yahoo Slurp" rather than the sourced "browser=Yahoo! Slurp" causes everything to function properly. The hosting people are running under PHP 4.3.4 at the moment. Reproduce code: --------------- function browserCapabilities($userAgent, $browscapLocation) { [..Some initialisation if variables..] print " Processing: $userAgent\n"; $this->browscapFile = parse_ini_file ($browscapLocation, TRUE); [..Some array processing..] [.. Print statements for browser capabilities..] } Expected result: ---------------- Processing: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322) Browser supports JavaScript: Yes Browser supports CSS Level 2: Yes Browser is text-only: No Browser is MSIE: Yes Browser detection complete. Browser type set to: msie. Actual result: -------------- Processing: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322) <br /> <b>Warning</b>: Error parsing /nfs/home/air-cr2/public_html/anneharris/includes/browscap.ini on line 521 in <b>/nfs/home/air-cr2/public_html/includes/processBrowscap.hpi</b> on line <b>164</b><br /> Browser supports JavaScript: No Browser supports CSS Level 2: No Browser is text-only: No Browser is MSIE: No Browser detection complete. Browser type set to: incapable. -- Edit bug report at http://bugs.php.net/?id=27839&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27839&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27839&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27839&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27839&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27839&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27839&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27839&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27839&r=support Expected behavior: http://bugs.php.net/fix.php?id=27839&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27839&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27839&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27839&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27839&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27839&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27839&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27839&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27839&r=float