Partner and Community Forums
Path Differences between CGI and ISAPI
Last post Jul 30, 2007 02:59 AM by GeorgeZ
Jul 26, 2007 07:59 PM|lordandy|LINK
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?
Jul 26, 2007 11:13 PM|rickjames|LINK
What do the two implementations return for:
Could you use something like DOCUMENT_ROOT or PHP_SELF instead of '.'?
Jul 27, 2007 04:13 AM|lordandy|LINK
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
Jul 30, 2007 02:59 AM|GeorgeZ|LINK
I got someone is doing this way: