php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74755 Host based open_basedir setting broke in 7.0.20 and 7.1.6
Submitted: 2017-06-13 19:03 UTC Modified: 2017-06-13 21:24 UTC
From: joshin at hotmail dot com Assigned:
Status: Duplicate Package: *Configuration Issues
PHP Version: 7.1.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joshin at hotmail dot com
New email:
PHP Version: OS:

 

 [2017-06-13 19:03 UTC] joshin at hotmail dot com
Description:
------------
In previous versions of 7.0 & 7.1 I could use an ext file like the paste in the "test script" area to limit access to files by the HOST variable sent to PHP FPM.

With 7.0.20 and 7.1.6, the behavior changed. Now, the HOST setting appears to be ignored, and the last open_basedir variable labeled in the file (site3.com's) gets set.

This results in errors for "site1.com" and "site2.com".

Test script:
---------------
[HOST = site1.com]
 open_basedir = /home/www/whphx16/site1.com:/tmp:/home/www/phpmyadmin:/home/www/adminer
[HOST = site2.com]
 open_basedir = /home/www/whphx16/site2.com:/tmp:/home/www/phpmyadmin:/home/www/adminer
[HOST = site3.com]
 open_basedir = /home/www/whphx16/site3.com:/tmp:/home/www/phpmyadmin:/home/www/adminer


Expected result:
----------------
I expect each site to have a custom setting for open_basedir

Actual result:
--------------
All sites get the last entry's setting for open_basedir

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-13 21:13 UTC] spam2 at rhsoft dot net
no idea why you did file it for not related "PHP Version: 7.1.6 but the issue is known and already fixed -> https://git.php.net/?p=php-src.git;a=shortlog;h=refs/heads/PHP-7.1

PHP                                                                        NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017, PHP 7.1.7

- Core:
  . Fixed bug #74738 (Multiple [PATH=] and [HOST=] sections not properly
    parsed). (Manuel Mausz)
  . Fixed bug #74658 (Undefined constants in array properties result in broken
    properties). (Laruence)
  . Fixed misparsing of abstract unix domain socket names. (Sara)
 [2017-06-13 21:24 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2017-06-13 21:24 UTC] nikic@php.net
Closing as duplicate of bug #74738.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Nov 15 17:01:26 2018 UTC