This topic is locked
[SOLVED]

 Probable IIS bug, wrong working directory

7/22/2008 12:10:34 PM
PHPRunner General questions
S
steveh author

Some phperunner generated code is trying to report an error and states that it can't find include\errors.xml.
I've just added some debug and at that point the code thinks the working directory is system32.
I'm guessing that this is really an IIS bug, but I'm interested in knowing if anybody else has seen this error and iof they have, what version of IIS they are running?
I'm running this on my test box under XP which is IIS 5.1
I've checked the IIS settings and these look good, just seems that IIS doesn't set the path correctly?
So if you wish to deploy phprunner tasks on IIS under XP then either publish directly to the inetpub... tree or add a definition of the cwd to your code.

J
Jane 7/23/2008

Steve,
this error happens because of your incorrect PHP settings.

To make your pages working open include/commonfunctions.php file, find this line:

$path_to_file = "include/errors.xml";



and replace it with this one:

$path_to_file = dirname(file)."/errors.xml";


We'll add this fix to the next update.

S
steveh author 7/23/2008

I've already made that as a change, but the bug is an IIS one, now I've gone looking, many people have complained of this issue on XP.
IIS should set the working directory to the virtual directory but they don't.
This is a good solid fix for the issue though, thanks.

L
laurent 7/31/2008

I've already made that as a change, but the bug is an IIS one, now I've gone looking, many people have complained of this issue on XP.

IIS should set the working directory to the virtual directory but they don't.
This is a good solid fix for the issue though, thanks.



Hi Steve,

Thanks for your help on mypost of today regarding global functions.
For your IIS issue why don't you run WAMP rather than WIMP ;-)
WAMP: Windows Apache (instead of IIS) MySQL Php

WIMP: Windows IIS MySQL Php
I had many issues with IIS and none with Apache server..
Cheers,
Laurent.

S
steveh author 7/31/2008

Not an option I'm afraid, we have to run whatever is on the customer site, this customer is Windows and IIS.