Go Back   Garayed.com > PHP
Reply
 
LinkBack Thread Tools Search this Thread Display Modes

PHP & IIS
  #1 (permalink)  
Old 04-04-2008, 09:49 PM
otrWalter@gmail.com
 
Posts: n/a
Default PHP & IIS

DOCUMENT_ROOT does not exist on my friend IIS installation.

I used __FILE__ to get the path of a "config.php" file sitting in the
document root, pulled off the file name, and got...

\\[mount_vol_name]\dir\path\to\web\

OK, I used that to define $web_root and then used that car to try and
REQUIRE other file.

I kept getting FILE CAN NOT BE FOUND errors.

I build the path by hand...

$web_root = '\\[mount_vol_name]\dir\path\to\web\';

same result.

then I did this...

$web_root = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR .
'[mount_vol_name' . DIRECTORY_SEPARATOR .
'dir' . DIRECTORY_SEPARATOR .
'path' . DIRECTORY_SEPARATOR .
'to' . DIRECTORY_SEPARATOR .
'web';

And this worked!!

Not really what I want to do!

I really would like an automated way to do this.

Anyone have any ideas?

Walter

PS: besides to use linux and/or apache?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: PHP & IIS
  #2 (permalink)  
Old 04-04-2008, 10:58 PM
Jerry Stuckle
 
Posts: n/a
Default Re: PHP & IIS

otrWalter@gmail.com wrote:
> DOCUMENT_ROOT does not exist on my friend IIS installation.
>
> I used __FILE__ to get the path of a "config.php" file sitting in the
> document root, pulled off the file name, and got...
>
> \\[mount_vol_name]\dir\path\to\web\
>
> OK, I used that to define $web_root and then used that car to try and
> REQUIRE other file.
>
> I kept getting FILE CAN NOT BE FOUND errors.
>
> I build the path by hand...
>
> $web_root = '\\[mount_vol_name]\dir\path\to\web\';
>
> same result.
>
> then I did this...
>
> $web_root = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR .
> '[mount_vol_name' . DIRECTORY_SEPARATOR .
> 'dir' . DIRECTORY_SEPARATOR .
> 'path' . DIRECTORY_SEPARATOR .
> 'to' . DIRECTORY_SEPARATOR .
> 'web';
>
> And this worked!!
>
> Not really what I want to do!
>
> I really would like an automated way to do this.
>
> Anyone have any ideas?
>
> Walter
>
> PS: besides to use linux and/or apache?
>


Load PHP as an ISAPI module, not a CGI. DOCUMENT_ROOT exists then.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:34 AM.


Powered by vBulletin® Version 3.5.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
| Home | FAQ | Members List | Calendar | Today's Posts | Search | New Posts |