Click to See Complete Forum and Search --> : virtual directories using IIS


sprite
03-18-2004, 01:51 PM
hi!

new guy here :)

i'm working with PHP on IIS for the first time (they're all about micro$oft here) and i can't get my includes to work without puttin in hard links, e.g. "c:\web sites\blah\includes\".

Question is: how can i use virtual paths to link to my includes?

the webserver is set up like this:
server root is -> c:\inetpub\wwwroot
php installed here -> c:\PHP
websites mapped virtually from here -> c:\web sites\sitename


i've tried changing the doc_root in php.ini many different ways but php stops working if i put anything in there. let me know if you need any more info!

thanks for your help,
sprite!

piersk
03-19-2004, 06:18 AM
Ok, I have PHP running on IIS here at work and I have doc_root left blank.

Firstly, are you using a windows server (as in, multiple websites on the server, not just multiple VDs)? If you are, then you can set up each "website" how you want (i.e. some can run PHP stuff and some can't)

Also, have you set up the properties of the webserver right, so it can actually make use of PHP?

If you haven't then go to the properties of the "website", then click on the "Home Directory" tab, click "Configuration", then "Add". In the "Executable" box, you can either browse to the php.exe file, or just type it in if you know the path and in the "Extension" box simply type ".php" (or whatever extension you want).

Finally, restart the "website" (not the webserver itself) and bob's your uncle.

Hope this helps.