php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69254 .user.ini ignored in subfolders
Submitted: 2015-03-18 09:45 UTC Modified: 2015-08-17 12:05 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: framelio at gmail dot com Assigned:
Status: Not a bug Package: FPM related
PHP Version: 5.6.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: framelio at gmail dot com
New email:
PHP Version: OS:

 

 [2015-03-18 09:45 UTC] framelio at gmail dot com
Description:
------------
I have a problem with all the recent versions of PHP: 5.3.29, 5.4.38, 5.5.22 and 5.6.6.

The .user.ini file is considered in the directory containing the PHP file itself, but ignored in the subfolders.

Configuration on linux with Apache 2.4.12 and mod_proxy_fcgi and PHP-FPM configuration:

<FilesMatch \.php$>
 SetHandler "proxy:unix:/path/to/.socks/php-domain.sock|fcgi://domainname/"
</FilesMatch>

The .user.ini directives apply only in the same folder as the php file and not in the subfolders.

Some phpinfo:

Server API: FPM/FastCGI (fpm-fcgi and not cgi-fcgi)
_SERVER["DOCUMENT_ROOT"] is correctly set to the virtualhost DocumentRoot

I didn't have the problem when working with mod_fastcgi using FastCgiExternalServer directive. I suppose that, in that configuration the API is cgi-fcgi?)




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-17 08:08 UTC] framelio at gmail dot com
This is not a bug or perhaps a different kind of bug.

I've noticed that the _SERVER["SCRIPT_FILENAME"] started with a double slash "//path/to/script.php".

This was due to a trailing slash in the configuration of the mod_proxy_fcgi directive.

SetHandler "proxy:unix:/tmp/file.sock|fcgi://localhost/"

should be replaced with

SetHandler "proxy:unix:/tmp/file.sock|fcgi://localhost"
 [2015-08-17 08:09 UTC] framelio at gmail dot com
-Status: Open +Status: Closed
 [2015-08-17 08:09 UTC] framelio at gmail dot com
Not a bug.
 [2015-08-17 12:05 UTC] cmb@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 07:01:29 2024 UTC