Last modified: 2011-11-29 22:27:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7414, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5414 - Problems With IIS 6 UNC Mapped Virtual Directory
Problems With IIS 6 UNC Mapped Virtual Directory
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.5.x
PC Windows Server 2003
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-31 18:19 UTC by Caleb Anthony
Modified: 2011-11-29 22:27 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Caleb Anthony 2006-03-31 18:19:07 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>
Comment 1 Rob Church 2006-04-01 22:38:39 UTC
Sounds like something else is going wrong; check things like the IIS and PHP
error logs to find out what.
Comment 2 Rick Blasingim 2006-04-03 15:38:08 UTC
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?
Comment 3 Caleb Anthony 2006-04-06 20:21:06 UTC
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.
Comment 4 Brion Vibber 2006-04-06 22:29:19 UTC
Sounds like this?
http://bugs.php.net/bug.php?id=17930
Comment 5 Brion Vibber 2006-04-06 22:54:44 UTC
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.
Comment 6 Brion Vibber 2011-11-29 21:53:57 UTC
CC'ing Ben Lobaugh (our current Windows server-side expert) to check if this or something like it may still be a current issue.
Comment 7 Ben Lobaugh 2011-11-29 22:27:02 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links