floezen — 2010-02-12T06:39:52-05:00 — #1
I would like to use the get_browser() function.
So I downloaded the php_browscap.ini at http://browsers.garykeith.com/downloads.asp and pointed to it in my php.ini.
But as soon as I try to use the get_browser() function, i.e.
$browser = get_browser(null, true);
the browser either returns a white page (Opera), downloads the page as empty file (FireFox) or informs me that the connection to the server has been unexpectedly disconnected (Safari).
Any idea what the error could be?
paul_wilkins — 2010-02-12T07:25:42-05:00 — #2
You'll need to restart the php server so that it can reread the ini file.
floezen — 2010-02-12T07:29:54-05:00 — #3
Thats not the problem. I have already restarted the server.
The local value for my info.php file shows
paul_wilkins — 2010-02-12T07:43:20-05:00 — #4
You can use phpinfo() to check the current settings for browscap
Does the conf folder have the correct owner and permissions for php to access it?
What do the error logs show for apache and php regarding this?
floezen — 2010-02-12T08:14:02-05:00 — #5
The apache error log shows:
[Fri Feb 12 15:11:46 2010] [notice] child pid 5643 exit signal Segmentation fault (11)
[Fri Feb 12 15:11:46 2010] [notice] child pid 5700 exit signal Segmentation fault (11)
[Fri Feb 12 15:11:46 2010] [notice] child pid 5701 exit signal Segmentation fault (11)
The php error log does not record anything on this event...?!
The file has following permisions:
-rw-r--r-- 1 myusername psacln 339908 Feb 12 11:56 php_browscap.ini
paul_wilkins — 2010-02-12T08:19:11-05:00 — #6
That type of crash is what used to happen with get_browser when running on PHP3
floezen — 2010-02-12T08:36:27-05:00 — #7
Hmm, on my server PHP version 5.2.11 is running.
paul_wilkins — 2010-02-12T08:44:28-05:00 — #8
There may-well be a bug relating to the null parameter.
Try feeding it an actual user agent string and see how that goes.