Bug #74501 [NEW]: get_browser() generates incorrect error
| From: | dpatterson at dplhenterprises dot com | Date: | Wed, 26 Apr 2017 16:53:49 +0000 |
| Subject: | Bug #74501 [NEW]: get_browser() generates incorrect error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208808@lists.php.net to get a copy of this message | ||
From: dpatterson at dplhenterprises dot com
Operating system: Ubuntu 16.0.4
PHP version: 7.0.18
Package: PHP options/info functions
Bug Type: Bug
Bug description:get_browser() generates incorrect error
Description:
------------
The get_browser() function can generate a "Warning: get_browser():
browscap ini directive not set" error when the browscap ini directive
*is* set.
The browscap file is read at run time. This means that the web server
must be able to read it.
If the file's protection or ownership prevents the web server from
reading it (e.g., if it's owned by root), get_browser() will generate
the "Warning: get_browser(): browscap ini directive not set" error
instead of reporting that the file can't be read.
Test script:
---------------
/*
* In php.ini:
* browscap = /etc/php/7.0/apache2/lite_php_browscap.ini
* lite_php_browscap.ini is owned by root
*/
$bData = get_browser(); // Results in incorrect error.
Expected result:
----------------
$bData contains an object describing the browser.
Actual result:
--------------
"Warning: get_browser(): browscap ini directive not set" error.
--
Edit bug report at https://bugs.php.net/bug.php?id=74501&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74501&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74501&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74501&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74501&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74501&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74501&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74501&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74501&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74501&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74501&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74501&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74501&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74501&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74501&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74501&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74501&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74501&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74501&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74501&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74501&r=mysqlcfg