#17930 [Com]: problem when apache serving a php page that reside on the network

From: Date: Thu, 15 Aug 2002 05:13:13 +0000
Subject: #17930 [Com]: problem when apache serving a php page that reside on the network
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16880@lists.php.net to get a copy of this message
ID: 17930 Comment by: bcf@jwfc.jfcom.mil Reported By: HummerX123@hotmail.com Status: Open Bug Type: Apache related Operating System: Win2k PHP Version: 4.2.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2002-07-03 15:18:33] cpelkey@charter.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-06-24 17:00:14] HummerX123@hotmail.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-06-23 10:32:30] HummerX123@hotmail.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-23 06:40:36] 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 04:20:19] HummerX123@hotmail.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17930&edit=1

« previous php.bugs (#16880) next »