I have got a number of scripts being moved from an Apache server to an IIS server. Many of these scripts assume that the current working directory of the script is the same as the directory containing the primary (?) scipt file being run. On the IIS server this seems to not be the case, with the working directory always being the PHP directory (e.g. C:\PHP).
Is there some way to change this and make IIS or the FastCGI module use the scripts directory?
I also tried putting a "chdir(dirname(__FILE__))" at the start of the scripts, but apperently that idea is not allowed, with chdir("C:\MySite") failing ("No such file or directory (errno 2)") while "C:\" or "C:\MySite\subdir\" seem to work...