Previous Next

Thread: Path Differences between CGI and ISAPI

Last post 07-30-2007 2:59 AM by GeorgeZ. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 07-26-2007, 7:59 PM

    • lordandy
    • Not Ranked
    • Joined on 07-26-2007, 11:54 PM
    • Posts 2
    • lordandy

    Path Differences between CGI and ISAPI

    Dear Community!



    I installed PHP 5.2 on a Windows 2003 Server. My Document Root Folder is d:\inetpub\website. If I run PHP as CGI-extension and do an include("./inc.test.php"), I don't have any problems. If i print out real_path("/") i get back "D:" as it should be I think.

     If i change now to run PHP as an ISAPI extension, i get include-errors, the file cannot be found. If i print out real_path("/") i get back "C:"

     

    Does anyone know how I can change this, or where I can find a starting point for searching?

     

    Regards, Andy
     

  • 07-26-2007, 11:13 PM In reply to

    • rickjames
    • Top 25 Contributor
    • Joined on 10-31-2006, 6:43 PM
    • Posts 193
    • rickjames

    Re: Path Differences between CGI and ISAPI

    What do the two implementations return for: http://php.net/manual/en/function.getcwd.php

    Could you use something like DOCUMENT_ROOT or PHP_SELF instead of '.'?

  • 07-27-2007, 4:13 AM In reply to

    • lordandy
    • Not Ranked
    • Joined on 07-26-2007, 11:54 PM
    • Posts 2
    • lordandy

    Re: Path Differences between CGI and ISAPI

    As CGI-Extension, getcwd() returns d:\inetpub\website as it should be, but as isapi extension, i get back "c:\windows\system32\inetsrv".

     

    I could use somthing like that instead of "./" but the problem is the site is completely programmed and it would be a lot of work to change it everywhere 

  • 07-30-2007, 2:59 AM In reply to

    • GeorgeZ
    • Top 50 Contributor
    • Joined on 11-16-2006, 6:09 AM
    • Peking
    • Posts 67
    • GeorgeZ

    Re: Path Differences between CGI and ISAPI

    I got someone is doing this way:

    http://www.thescripts.com/forum/thread161.html

    http://www.thescripts.com/forum/thread337.html
     

Page 1 of 1 (4 items)
Page view counter