You will laugh if you read to the end of this :) This is now driving me nuts - can't get php to include an existing file with proper permissions set etc.
I have test.php file and "lib/tools.php" file.
I run the following code:
$fn = 'C:\Sasha\ThreeDiamonds\www\lib\tools.php';
if(file_exists($fn)){
echo "Trying to INCLUDE THE BLoody file: $fn";
if(require_once($fn)==false) echo("failed to include: ".$fn);
}
and get the following:
Trying to INCLUDE THE BLoody file: C:\Sasha\ThreeDiamonds\www\lib\tools.php Warning: require_once(C:\Sasha\ThreeDiamonds\www): failed to open stream: Permission denied in C:\Sasha\ThreeDiamonds\www\test.php on line 5 Fatal error: require_once(): Failed opening required '' (include_path='.;C:\php5\pear') in C:\Sasha\ThreeDiamonds\www\test.php on line 5
Now, this is running Windows/IIS and recent version of php.
The following works fine if I call another php file from same with tools.php directory with the following code in it:
require('tools.php');
$mytools = new tools();
$mytools->ShowGallery();
This is driving me really mad :) IIS is setup to annon auth with app pool identity - I can see php-cgi.exe is running under Local Service account and I did make sure tools.php effective permissions allow full access for this account.
I enabled security auditing for this tools.php file for failed attempts and it's not showing any issues.
ok, I went ahead and installed ProcMon to see what's going on here. All I get is "FAST IO DISALLOWED" for "Query Open" operation. Mmmmm? Windows7 yeah.
I'm lost, please help :)