php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6378 browscap configuration cause PHP to crash
Submitted: 2000-08-27 12:35 UTC Modified: 2000-08-31 20:34 UTC
From: stud1174 at di dot uoa dot gr Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.2 OS: NT4 Server SP6a
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stud1174 at di dot uoa dot gr
New email:
PHP Version: OS:

 

 [2000-08-27 12:35 UTC] stud1174 at di dot uoa dot gr
I just installed PHP4.0.1pl2 on windows NT4 server with SP6a. I configured it to work as a CGI wrapper with Apache 1.3.12. I used the precompiled verion. The problem is that when I use the browscap directive in php.ini to point to the browscap.ini file, PHP cease to work. In fact it doesn't crash but it never finishes processing the currect page. If I try to reload the page a new PHP process is created and all these processes continue forever! When I comment out the browscap directive all work fine again.
I also tried to use a full path to the browscap.ini file instead of a relative one and also to enclose the path in double quotes but nothing worked. Finally I tried to use a path that doesn't exists:
     browscap = d   ;d does not exists
With this configuration PHP ran but not normally. The output page was not properly formated.

Finally the borwscap.ini that I use is version 2.5 (but I don't think this matters) and the only change to the php.ini that I made is
     session.save_path = sessiondata\

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-29 09:49 UTC] sniper@php.net
There has been some fixes regarding this problem in
the latest CVS. Please try it or snapshot from http://snaps.php.net or wait for php4.0.2 to be released.

Please report back then whether this problem persists or not.

--Jani
 [2000-08-31 20:03 UTC] stud1174 at di dot uoa dot gr
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!
 [2000-08-31 20:34 UTC] sniper@php.net
As for that error message check this url:

http://marc.theaimsgroup.com/?l=php-dev&m=96469940831453&w=2

And about your feature/change request: 
Open a new bug report. Only one bug per report, please.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Jul 02 07:00:02 2026 UTC