PHP 4.0 Bug #6378 Updated: browscap configuration cause PHP to crash

From: Date: Fri, 01 Sep 2000 00:03:12 +0000
Subject: PHP 4.0 Bug #6378 Updated: browscap configuration cause PHP to crash
Groups: php.dev 
Request: Send a blank email to php-dev+get-31528@lists.php.net to get a copy of this message
ID: 6378 User Update by: stud1174@di.uoa.gr Old-Status: Feedback Status: Open Bug Type: Reproduceable crash Description: browscap configuration cause PHP to crash OK, I installed PHP 4.0.2 and the problem is fixed. However when I used browscap.ini version 2.5 (feb 2000), the following message box appeared when php.exe started: Error parsing browscap.ini on line 6300 This is the latest browscap.ini file downloaded from http://www.cyscape.com/browscap/ However the get_browser() function worked fine despite the message box. When I used the browscap.ini that comes with IIS4 (a very old file) everything worked fine! Finally I have a remark about the get_browser() function. When this function is called without arguments it is supposed to use $HTTP_USER_AGENT for argument. However if I use the configuration directive register_globals = Off then the variable $HTTP_USER_AGENT is not defined and get_browser() returns an error. In this case I have to do the following $HTTP_USER_AGENT = getenv("HTTP_USER_AGENT"); $browser = get_browser(); or alternatively $a = getenv("HTTP_USER_AGENT"); $browser = get_browser($a); I suggest that get_browser() function should act more clever in this case and use getenv() to get the HTTP_USER_AGENT! Full Bug description available at: http://bugs.php.net/?id=6378

« previous php.dev (#31528) next »