Referencing IIS Virtual Directories with PHP
Posted on 2011-09-27
We're running PHP v5.3.6 on a Windows Server 2008 R2 (x64) machine with IIS v7.5. We've created an IIS Virtual Directory pointing to a shared directory on a remote server (via UNC). With directory browsing enabled (in IIS), we're able to hit the URL of the virtual directory with a web browser and see the files contained within the corresponding directory on the remote server. However, PHP doesn't seem to be able to utilize the IIS Virtual Directory.
PHP's Filysystem and Directory functions work for local, physical directories, but don't seem to be able to utilize IIS' Virtual Directories.
phpinfo() shows "Virtual Directory Support" is disabled, but from what I've been able to gather, this has more to do with PHP's mod_rewrite URL.
Is there a way to make PHP aware of IIS' Virtual Directories? If so, how? And if not, is there an alternative way to reference a remote file system with PHP on IIS?