get_browser() returns FALSE

Actually, even not documented on the manual page, the get_browser function can return FALSE for multiple reasons.

At least a look into the underlying source code let one assume that.

I suggest you take a look in there and then let me know if you have additional questions. I might be able to answer them then.


You have tried around every required method.

http://php.net/manual/en/function.get-browser.php having note:

In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system.

browscap.ini is not bundled with PHP, but you may find an up-to-date php_browscap.ini file here.

While browscap.ini contains information on many browsers, it relies on user updates to keep the database current. The format of the file is fairly self-explanatory.


What solved the issue was moving browscap.ini to the public web directory.

It is may be pointing to that location. i.e. public web directory

Does get_browser() have special permissions requirements, or anything like that?

Read permissions are required only.

Tags:

Php

Browscap