php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20831 UNC paths do not work.
Submitted: 2002-12-05 10:27 UTC Modified: 2003-01-18 04:36 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: harry at rhsoft dot net Assigned:
Status: Closed Package: IIS related
PHP Version: 4.3.0RC2, 4.3.0 Release OS: Windows 9x/2000/XP
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: harry at rhsoft dot net
New email:
PHP Version: OS:

 

 [2002-12-05 10:27 UTC] harry at rhsoft dot net
If i use under ms iis fpr the root-directory of a website a unc-path in the network instead a local path i get a error

By using the isapi this message i get, but it also dont work with the cgi-version:
Warning: Unknown(\\srv-rhsoft\homepage\www.rhsoft.net\index.php): failed to create stream: No such file or directory in Unknown on line 0


Warning: Failed opening '\\srv-rhsoft\homepage\www.rhsoft.net\index.php' for inclusion (include_path='.') in Unknown on line 0



I hope that this error what exists since all versions of php i know will be found 

I will gratulate to php 4.3.0 rc 2 what runs on windows server very stable and fast.

Thanks to all developers for this great script language and greetings to the gnu/linux hackers from austria


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-05 11:00 UTC] sniper@php.net
better summary..

 [2002-12-09 04:36 UTC] fuh at eduhi dot at
i had the same problem:
using win2k/iis5/php4.3rc2 (also tested with snapshots from 11.11.2002 during 8.12.2002)

i have a web-root from an UNC path:
with php-cgi.exe i get following error:
warning: main (../include.php) [function.main]: failed to create stream: No such file or directory in \\server\share\script.php on line x

i have tested with CLI version (php.exe) that works with UNC, but i have missing http headers...

isapi dont works for me.
 [2002-12-09 04:39 UTC] wez@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-12-09 05:00 UTC] fuh at eduhi dot at
sorry, but STILL exists!
 [2002-12-09 05:04 UTC] wez@php.net
You will need to wait up to 3 hours for the snapshots to be rebuilt.
We only commited the fix a few minutes after your comment.
 [2002-12-09 11:47 UTC] fuh at eduhi dot at
i have re-tested now:
php4.3dev from 17:30 (9.12.2002) and php4.4dev-CVS from 15:30, problem still appears on my installation.

what can be done? user rights problem?
i will test the same with another win-os, winxp/iis6...
 [2002-12-10 08:46 UTC] fuh at eduhi dot at
hi,

i have tested actual win-snapshots (stable,cvs,ze2), and the problem still appears!
 [2002-12-10 08:59 UTC] edink@php.net
Hm, something did go wrong here. Confirming the problem still exists with 4.3.0-dev.
 [2002-12-10 20:11 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-12-11 09:01 UTC] fuh at eduhi dot at
UNC error still exists...

i have tested again with with w2k-sp3/iis5/php-CGI

config within iis5:
.php -> g:\phpsnapshot\php-cgi.exe %s %s

if i try to include a file from a "lower" dir like ../_php/include.php i still get the error described in this bug. what can be done?

i have tested actual snapshot versions (stable,cvs) from 11.dec. 15:30

i have also retestet the CLI version php.exe, it dont work! in a older snapshot this has worked.

i have not testet ISAPI.
 [2002-12-11 09:11 UTC] fuh at eduhi dot at
i meant 9:00 snapshot not 15:30 (this is localtime in austria)

i have now testet the ISAPI module of the snapshot, this do not work, following error appears:
PHP has encountered an Access Violation at 0F6C3B5E

is there an user right problem? iis config?
 [2002-12-11 09:25 UTC] msopacua@php.net
The CLI version should work, but to be sure, remove all old copies of 'php4ts.dll'. The fix is in this module.

 [2002-12-11 09:26 UTC] iliaa@php.net
I've tried the latest snap on WinXP using cli including  "../../file.txt" & "\\\\server\path\file.txt" and both works flawlessly. The few people I spoke to also didn't not encounter a problem opening/including files via relative or UNC path.
Therefor, I must conclude that the problem you are seeing is due to some issue on your end, possible left over dlls from older PHP, IIS config params and so on...
 [2002-12-11 11:29 UTC] fuh at eduhi dot at
i have replaced the dll (only one copy), but it dont work for me.
i will setup a second testinstall on another "clean" server.

maybe its a iis config problem... i will check this now.

thank for your helps...
 [2003-01-16 03:35 UTC] alexws@php.net
Confirming the bug with the PHP 4.3.0 release. Also found strange behaviour when opening files by UNC under WinNT5/IIS5/PHP4.3.0.

When I open file //proxy/somepath/... (on the server) by the UNC, it works fine. But when I try to open //main/somepath/... (on other server, permissions for browser are set accordingly) it fails. Also it fails opening files by UNC, except for the IIS server machine itself.

Suggestions?

P.S. Reopened the bug...

 [2003-01-16 05:00 UTC] msopacua@php.net
The UNC syntax has been verified and fixed, which was the original bug.

Please try to map the path as a network disk and access that. If that doesn't work either, there's no bug here, but a local config error.
 [2003-01-16 12:58 UTC] cg at gordimer dot net
Same setting runs perfectly here.

I think this is not a PHP but an IIS issue. Try to check 'check that file exists' in the IIS control panel where you enter the path to php.exe.

If this checkbox is not set, the context of php.exe will look for the file. In a CGI environment, this is LOCAL\SYSTEM - which usually does not have access to the remote server.

Because of this CLI works (it runs with the permissions of the user logged in) and local UNC work too (LOCAL\SYSTEM as sufficent rights).

If I had a CVS account I'd change this to a documentation problem.

Christoph
 [2003-01-16 18:14 UTC] edink@php.net
This bug is resolved so it should be closed.
 [2003-01-18 04:36 UTC] alexws@php.net
Yes, this IS the IIS problem. I am discontinuing bug discussion, but posting a workaround:

I did check the flag, but it still the same. Also, when the PHP script lies out of the IIS server (accessed by UNC), it is surely started in another context. The solution here is to change IIS account to some user inside your domain.

 [2003-01-18 10:18 UTC] cg at gordimer dot net
Yes, shure, the webserver account must have sufficiant access rights to the documents you try to open. However, this is not an IIS issue, the same is true for every web server. If the documents are on another machine, it's best to use a domain user or an identical (user name AND password) local (IUSER) account on the other machine.

Maybe this needs some documentation. I'm willing to write it, but somebody has to look over my text because of my limited english skills.

Christoph
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 03:01:32 2024 UTC