php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17930 problem when apache serving a php page that reside on the network
Submitted: 2002-06-23 04:20 UTC Modified: 2002-09-16 01:00 UTC
Votes:13
Avg. Score:4.4 ± 0.8
Reproduced:9 of 10 (90.0%)
Same Version:1 (11.1%)
Same OS:3 (33.3%)
From: HummerX123 at hotmail dot com Assigned:
Status: No Feedback Package: Apache related
PHP Version: 4.2.1 OS: Win2k
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: HummerX123 at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-06-23 04:20 UTC] HummerX123 at hotmail dot com
I am running Apache 1.3 on Windows 2000 and I got everything working fine when serving a test php script that is reside on the local machine. However I am starting to have all kind of weird error when Apache is serving a php page locate on a network. Please note that Apache still serving static html page just fine so there is no problem with the permission.

When I use the php module version for apache the follow error occur:
Warning: Failed opening 'pathtophppape' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0

Where 'pathtophppage' is something like '//machinename/webroot/phptest.php'

When I use the cgi version then Apache will throw a Internal Server Error

If anyone have any through on this pls let me know.

Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-23 06:40 UTC] sander@php.net
I think you should not use network shares in your document root. 
I'm sure that this is not a problem in PHP, but a (configuration) problem in Apache or Windows.
 [2002-06-23 10:32 UTC] HummerX123 at hotmail dot com
Something else that I might add is that the page that it failed to open is the page that i am serving for example when I am hitting http://localhost/test.php then the following error will be throw:

Warning: Failed opening '//machinename/webroot/test.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0

where webroot is a network share folder. So basically the error said it fail to open itself.....

However if test is a static html page then it work fine so I am sure that I don't have a problem with the configuration of Apache or windows.
 [2002-06-24 17:00 UTC] HummerX123 at hotmail dot com
Please note that it work fine when I map the network share to a drive. When I use pure UNC path then apache still serving static page just fine.
 [2002-07-03 15:18 UTC] cpelkey at charter dot net
I am having a similar problem, but my webdocs are not being read off the network.
I just Installed apache 1.3.26 and php 4.2.1 and am getting the same error log entry reported in this bug report.  I tried everything I could think of so far, to no avail.
 [2002-08-15 01:13 UTC] bcf at jwfc dot jfcom dot mil
I can duplicate HummerX123's problem. We are having the exact same problem. I strongly believe it is a PHP problem and not Apache. Apache can read static html files off a network share (via UNC path, i.e. \\hostname\share\path_to_files) without problem. Apache can also execute cgi's (like .exe files) over the unc path w/o problems. But when the PHP engine tries to access a php file over a UNC path it files. Altering the includes_path variable in the php.ini to include the UNC path (using either //hostname//... or \\hostname\\... conventions) fails the solve the problem. If I move the files back to the local drive there work fine. 

The comment about not using network shares as your document root is invalid. Many, many, sites do this so that data does not have to be copied between all the servers. Under windows NT and higher the preferred method of accessing a remote network share is via its UNC path NOT mapping the drive letter. In fact, automatically mapping drive letters under NT/Win2K pain in the butt and requires creating a special service just to map the drive. Its ashame Windows doesn't have NFS and the automounter. Perhaps you could remedy this problem using Microsoft's DFS and/or junction points (symlinks) but that shouldn't be necessary. 

In my opinion, its a problem with the internal PHP function that reads in the source code prior to parsing. It doesn't seem to understand UNC paths.
 [2002-08-15 01:14 UTC] bcf at jwfc dot jfcom dot mil
forgot to add configuration info:

Windows 2000 Server SP2 with most security hot fixes.
Apache 1.3.26
PHP 4.2.2
 [2002-08-15 14:02 UTC] kalowsky@php.net
have you tried:

mapping to the drive?
creating a shortcut to it in under you includes_path?


 [2002-09-16 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC