ID:               27372
 Comment by:       php_bug_27372 at garykeith dot com
 Reported By:      php-bug-NOSPAM-2004 at ryandesign dot com
 Status:           Verified
 Bug Type:         *General Issues
 Operating System: *
 PHP Version:      4CVS, 5CVS (2004-02-24)
 New Comment:

Sniper, I see you deleted my messages again. And you still have not
replied to the e-mail I sent you days ago. That's why I'm posting this
here instead of via e-mail. It seems to be the only way to reach you.



Ryan and Jay have been hard at work on fixing the problems with
get_browser(). They made use of my 23,000 user agents database and with
a couple of exceptions their mods made get_browser() work perfectly.
The exceptions seem related to the ini parser that get_browser()
apparently shares with other parts of PHP.



Anyway, I have already toned down the anti-PHP rhetoric on my website
because of the hard work these two guys have been doing and was ready
to make some temporary changes to my browscap.ini file to accommodate
PHP.



But first I want some assurance from someone on the PHP team that this
parser issue will be addressed, soon. I'd like to see it worked into
version 5 and then maybe backported to to the 4.3 branch.



Is this something you can help me with? If you'd prefer to contact me
via e-mail and delete this message that's fine with me.



~gary.


Previous Comments:
------------------------------------------------------------------------

[2004-02-26 15:39:37] php-bug-NOSPAM-2004 at ryandesign dot com

There's also a user agent with "check&get" in its name. 

While this does not cause a parser error, PHP fills its 

name into the array as "0" instead of its actual name. I 

suspect this is also related to the special way ini 

files are currently handled, and that it doesn't like 

the "&" char in the user agent string, and that this 

should be addressed at the same time as the "!" issue.

------------------------------------------------------------------------

[2004-02-24 11:14:33] php_bug_27372 at garykeith dot com

Oh, and the reason I cannot delimit certain values with double-quotes
is because browscap.dll does not strip out the quotes. If I entered
"Yahoo! Slurp" as a browser name then everyone using browscap.ini on
IIS would see "Yahoo! Slurp", including the double quotes as the
browser name.

------------------------------------------------------------------------

[2004-02-24 04:25:40] [EMAIL PROTECTED]

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..



------------------------------------------------------------------------

[2004-02-23 17:22:22] php-bug-NOSPAM-2004 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27372&edit=1

Reply via email to