Last modified: 2011-11-29 22:27:02 UTC
We store all our web content on a central file server. We then configure our IIS 6 servers with virtual directories pointing to the shares on that central server. Our setup is as follows: Windows Server 2003 IIS 6 PHP 5.1.2 ISAPI MySQL 5.0.19 (on another server) To re-create our virtual directory setup: Right click on a virtual directory in IIS Manager and select Properties. Click on the Virtual Directory tab. Select "A share located on another computer" In the network directory section we enter the file servers UNC. With a fresh install of 1.5.8, I try and open the page in my browser (http://servername/wiki). Only a blank page is returned. The source of the page is as follows: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Typ! content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> If I go directly to the config page (http://servername/wiki/config/index.php) it loads correctly. The environment is as follows: PHP 5.1.2: ok PHP server API is isapi; using ugly URLs (index.php?title=Page_Title) Have XML / Latin1-UTF-8 conversion support. PHP is configured with no memory_limit. Have zlib support; enabling output compression. Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions GNU diff3 not found. Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. Installation directory: \\servername\wiki Script URI path: /wiki I fill out the configuration options, click Install and everything runs ok except for the following errors: Warning: chdir() [function.chdir]: No such file or directory (errno 2) in \\servername\wiki\config\index.php on line 465 Warning: chdir() [function.chdir]: No such file or directory (errno 2) in \\servername\wiki\config\index.php on line 473 The LocalSettings.php file is created successfully, and I move it into the parent directory. Then I visit the main page again, I still get a blank screen and the page source is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Typ! content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML>
Sounds like something else is going wrong; check things like the IIS and PHP error logs to find out what.
We're having the exact same problem that the original poster describes. The setup is pretty common and is detailed in this article: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/ remstorg.mspx What we have (and what the original poster describes) is most like the "High Volume Scenario" Fig. 3 Let me add that if we copy the content locally, it works fine. That is: content in c:\inetpub\wwwroot\wiki is great. The same content in \\server\wiki is not great. But, we too can get through the config from \\server\wiki, it only fails when we try to load index.php. I did check the IIS log, and it looked clean. I did not check the PHP log because I'm a PHP idiot. Where is it by default?
I turned on PHP error logging, and it looks like the problem is with the path. Here is the errors I get when opening the wiki for the first time: PHP Warning: require_once(./includes/Defines.php) [<a href='function.require- once'>function.require-once</a>]: failed to open stream: No such file or directory in \\servername\wiki\index.php on line 30. PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required './includes/Defines.php' (include_path='.;C:\php5\pear') in \\servername\wiki\index.php on line 30. If I then open index.php and modify line 30 from './includes/Defines.php' to 'includes/Defines.php' I get a new error: PHP Warning: require_once(includes/SiteConfiguration.php) [<a href='function.require- once'>function.require-once</a>]: failed to open stream: No such file or directory in \\servername\wiki\includes\DefaultSettings.php on line 31. PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/SiteConfiguration.php' (include_path='.;C:\php5 \pear') in \\servername\wiki\includes\DefaultSettings.php on line 31. If I modify the line 'includes/SiteConfiguration.php' to 'SiteConfiguration.php' in DefaultSettings.php, the main page loads correctly, and it tells me that I need to set up the Wiki. I then configure the Wiki, and everything goes great, except for the same two warnings: Warning: chdir() [function.chdir]: No such file or directory (errno 2) in \\servername\wiki\config\index.php on line 487 Warning: chdir() [function.chdir]: No such file or directory (errno 2) in \\servername\wiki\config\index.php on line 503 I move the LocalSettings.php file into the parent directory and try and load the main page. The main page comes up, but it still tells me that I need to setup the Wiki. If I then go to the config page, it tells me that the Wiki is already setup and that I should delete the /config directory for extra security. It really seems that the UNC path is the problem here.
Sounds like this? http://bugs.php.net/bug.php?id=17930
This appears to be a general problem with PHP. With no IIS to test with, we can't really do any testing on it either. Resolving as LATER.
CC'ing Ben Lobaugh (our current Windows server-side expert) to check if this or something like it may still be a current issue.
The last activity was in 2006. This was probably an issue with paths not being resolved correctly with / versus \. That has been fixed in the newer versions of PHP. I am going to mark this as fixed for now. If anyone runs into this issue again the report can be reopened.