Bug #50374 [Com]: .user.ini subdirectory not working and problem with [PATH] in php.ini

From: Date: Sat, 13 Sep 2014 13:08:28 +0000
Subject: Bug #50374 [Com]: .user.ini subdirectory not working and problem with [PATH] in php.ini
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187535@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50374&edit=1

 ID:                 50374
 Comment by:         dummy at dumyydummy dot com
 Reported by:        tom_borgo at hotmail dot com
 Summary:            .user.ini subdirectory not working and problem with
                     [PATH] in php.ini
 Status:             Assigned
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   XP SP3
 PHP Version:        5.3.1
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Same problem on Win7 with apache 2.4.10 X86 (the one from apache haus and the one from Apache
Lounge) and php 5.6.0, php 5.5.16 or php 5.3.29 all in fcgi mode.

php configurations defined in .user.ini only apply to the folder where .user.ini is. Not subfolders.


Previous Comments:
------------------------------------------------------------------------
[2011-07-08 11:21:59] carsten_sttgt at gmx dot de

> /www/phpinfo.php -> take into account the /www/.user.ini
> /www/administrator/phpinfo.php -> take NOT into account the /www/.user.ini

Just found out: The same problem exists in PHP 5.3.6-NTS-VC9; Apache/2.2.19 (CGI setup); Windows 7
32bit

Even I can read in the manual:
| In addition to the main php.ini file, PHP scans for INI files in each
| directory, starting with the directory of the requested PHP file, and working
| its way up to the current document root

I have a DOCUMENT_ROOT = "D:\Webserver\Apache2.2\htdocs"
And the files:
D:\Webserver\Apache2.2\htdocs\.user.ini
D:\Webserver\Apache2.2\htdocs\phpinfo.php (working)
D:\Webserver\Apache2.2\htdocs\test\phpinfo.php (not working)

Regards,
Carsten

------------------------------------------------------------------------
[2010-06-13 20:56:31] tom_borgo at hotmail dot com

Thanks Pajoye for your fast answer.
I really hope you can fix it ! :)

Yes htscanner is an alternative solution, i never try it. I prefer rely on PHP itself. And htscanner
is in alpha stage and last release is more one year old, i mean for system in real production it is
necessary to have stable version. Htscanner seems ok for leisure purpose but I will not use it for
bussiness application.

------------------------------------------------------------------------
[2010-06-13 20:32:37] pajoye@php.net

Assigned means "someone (me) will work on it", not "it is fixed" :)

Btw, htscanner allows htaccess-like file for 5.x, for the record.

------------------------------------------------------------------------
[2010-06-13 20:19:49] tom_borgo at hotmail dot com

Hello,

Yes, the problem has not been resolved, or the documentation has not been updated to say that it is
normal that it doesn't affect the subdirectory.
It is a shame because .user.ini is very important to use php directive by directory (because
htaccess cannot be used in this way like PHP in apache module).

I hope problem will be taken really into consideration. And it is really easy to test it.

Thanks.
Thomas.

------------------------------------------------------------------------
[2010-06-10 21:15:49] jirka at pbox dot cz

Same issue with php 5.3.2 (CGI) on WinXP SP3. Build date Apr 1 2010 17:13:20.
.user.ini custom setting works in the directory where the ini file is located, but 
has no effect in any of subdirectories.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=50374


--
Edit this bug report at https://bugs.php.net/bug.php?id=50374&edit=1


Thread (18 messages)

« previous php.bugs (#187535) next »