From:             php-bugs at sievers dot dialup dot fu-berlin dot de
Operating system: 
PHP version:      5.5Git-2013-05-17 (Git)
Package:          CGI/CLI related
Bug Type:         Feature/Change Request
Bug description:Search for .user.ini files from script dir up to 
CONTEXT_DOCUMENT_ROOT

Description:
------------
Currently PHP-CGI searches for .user.ini files in the script directory and
all parent directories up to DOCUMENT_ROOT.

See: http://php.net/manual/en/configuration.file.per-user.php

If Apache web servers use the UserDir module the php scripts lie out of the
DOCUMENT_ROOT, which causes PHP-CGI to search only in the script directory
for .user.ini files. This is inconvenient for users, who have to copy their
.user.ini files to all sub-directories in order to apply their settings.

Since Apache 2.3.13 there is an additional CONTEXT_DOCUMENT_ROOT variable,
which is set by mod_userdir and probably mod_alias accordingly.

See
http://stackoverflow.com/questions/12129433/what-is-servercontext-prefix/12129649#12129649

PHP-CGI could use this variable (if set) to search for .user.ini files. It
could search from the script directory up to CONTEXT_DOCUMENT_ROOT. If the
variable is not set, PHP-CGI should use DOCUMENT_ROOT as it has before.

Even other web servers (e.g. Apache 2.2) can profit from this change, since
it's easy to set CONTEXT_DOCUMENT_ROOT variable via a RewriteRule
directive.

Apache http's suexec support the CONTEXT_DOCUMENT_ROOT variable too:

  *) suexec: Add environment variables CONTEXT_DOCUMENT_ROOT,
CONTEXT_PREFIX,
     REDIRECT_ERROR_NOTES, REDIRECT_SCRIPT_FILENAME, REQUEST_SCHEME to the
     whitelist in suexec. PR 51499. [Graham Laverty <graham reg ca>,
     Stefan Fritsch]

(http://mirror.serversupportforum.de/apache//httpd/CHANGES_2.4)

Jan Sievers


-- 
Edit bug report at https://bugs.php.net/bug.php?id=64865&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64865&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64865&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64865&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64865&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64865&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64865&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64865&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64865&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64865&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64865&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64865&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64865&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64865&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64865&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64865&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64865&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64865&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64865&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64865&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64865&r=mysqlcfg

Reply via email to