php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54270 .user.ini not working on network shared DOCUMENT_ROOT
Submitted: 2011-03-16 13:20 UTC Modified: 2021-11-11 07:23 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: j dot henge-ernst at interexa dot de Assigned: cmb (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 5.3.5 OS: Windows Server 2003 R2 SP2
Private report: No CVE-ID: None
 [2011-03-16 13:20 UTC] j dot henge-ernst at interexa dot de
Description:
------------
From phpinfo for the file:
_SERVER["DOCUMENT_ROOT"]	//htdocserv/htdocsns/
_SERVER["SCRIPT_FILENAME"]	//htdocserv/htdocsns/user/hernst/head/xml/iwat/tools/version.php

In processmonitor I only see one access try to
\\htdocserv\htdocsns\user\hernst\head\xml\iwat\tools\.user.ini
and not to
\\htdocserv\htdocsns\user\hernst\head\xml\iwat\.user.ini
\\htdocserv\htdocsns\user\hernst\head\xml\.user.ini
...

I have one .user.ini file in
C:\>dir \\htdocserv\htdocsns\user\hernst\head\xml\*.ini
 Volume in drive \\htdocserv\htdocsns is htdocsns
 Volume Serial Number is AF3D-2838
 Directory of \\htdocserv\htdocsns\user\hernst\head\xml
16.03.2011  11:40                19 .user.ini
               1 File(s)             19 bytes

Seems the alogrith does not work properly with the network shares on windows and trying to macht the Document-Root to the current file


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-16 13:39 UTC] pajoye@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: pajoye
 [2011-03-16 13:39 UTC] pajoye@php.net
Any reason why you don't mount it instead?

However it should work anyway, but can you try by mounting this path as a folder 
or drive please?
 [2011-03-16 14:00 UTC] j dot henge-ernst at interexa dot de
-Status: Feedback +Status: Assigned
 [2011-03-16 14:00 UTC] j dot henge-ernst at interexa dot de
Can't use it as drive because apache does not start then:
DocumentRoot z:/
DocumentRoot z:
DocumentRoot "z:/"
leads to a Syntax error on line 6 of C:/Program Files/Zend/Apache2/conf/default-with-letter.conf

Using
DocumentRoot "//htdocserv/htdocsns"
works
This might happen for apache as Z: is not available in that context. Running apache as Service with NT AUTHORITY\NetworkService Account.
 [2011-03-16 14:22 UTC] pajoye@php.net
That's rather weird, it works just fine here. But that's hardly a php problem (the 
conf error).

What if you use a folder? Mounting the share as c:\apache\htdocs for example?
 [2011-03-16 15:26 UTC] j dot henge-ernst at interexa dot de
-Operating System: Windows +Operating System: Windows Server 2003 R2 SP2
 [2011-03-16 15:26 UTC] j dot henge-ernst at interexa dot de
Sorry, can't get the network share to map to a sirectory. The typical thing with junction and mklink commands does not seem to work on Windows Server 2003 R2 SP2. Or is there any other command to map the share to a directory in Windows Server 2003 R2?
 [2011-03-16 15:45 UTC] pajoye@php.net
Ah right, junctions are only for local data, sorry.

However the drive letter issue is weird, sounds like a problem in the zend 
server's apache, please report the issue to them.

I will take a look at the initial problem as soon as possible.
 [2017-10-24 07:33 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2021-11-10 18:40 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-11-10 18:40 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-11-11 07:23 UTC] j dot henge-ernst at interexa dot de
-Status: Feedback +Status: Closed
 [2021-11-11 07:23 UTC] j dot henge-ernst at interexa dot de
Currently that feature is no longer required, so didn't check it again if it works with a most recent php version
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC