0

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...

1 Answer 1

0

You could try moving the PHP executable into the same directory as the scripts? (It doesn't sound awesome to me, but then I can't think of another solution if it's not possible to specify a working directory otherwise).

If you do that, I think you'll also need to update your Web Service Extensions list to reflect the new location.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .