IIS Virtual Paths

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
(Summary: is there a way to convert virtual paths to physical paths
using PHP on IIS?)

I hope I'm not covering old ground, but I've spent a couple of hours
looking for this information and have so far failed.

I'm creating a PHP site that will run on IIS (not my choice, so please
don't just say "use Apache"), and I want to implement a virtual
directory system to allow multiple "installations" that use a single
code location.
(This would mean that I could update the base code once and all the
sites would "receive" the change, but using virtual paths each site has
it's own configuration files, etc.)

For this to work correctly, I need to be able to convert a virtual path
on IIS into a physical path, and this is where I'm failing to find any
useful information.
Unfortunately I'm coming round to the conclusion that there isn't a way
of doing this.

If you can prove me wrong please, please do...!
Any help greatly appreciated.

Tom  :-)

Re: IIS Virtual Paths

Tom Hartland wrote:
Quoted text here. Click to load it

You are out of luck. It hasn't occurred to anyone yet that such a
function would be useful.

Re: IIS Virtual Paths

Chung Leong wrote:
Quoted text here. Click to load it

That's what I was afraid of.  :-(

As a get-around, I'm now using an overly complex method of parsing
$_SERVER['SCRIPT_FILENAME'] to pick up the virtual path, and using an
internal look-up table for the physical path.

Not ideal - but it will have to do.

Anyway, thanks for the information Chung.
Tom  :-)

Re: IIS Virtual Paths

Hello Tom.
I wish my answer can help you.
Use php_iisfunc extension introduced at

Please consider that i'm not english user,
so my message is too short to explain enough.


Site Timeline