Jump to content

2 problems: root dir and access denied error


Recommended Posts

Hello all,

 

I have 2 problems, I cannot understand as of yet.

 

The first thing is: on PHP 5.3.6 when you type

opendir('.');

you upon the current directory, where your php scriptfile is located. On PHP 5.3.6 it opens my php directory ? (D:\php that is....) Why is that ? And how can I get the old behaviour back? Some people will say, that using a . inside opendir is not best practice, but it's just an example.

require('./required/file1.php')

for instance, doesn't work as well. PHP will try to open D:\php\required\file1.php

 

Second problem is: why can't I opendir my documentroot ? It keeps giving me access denied. I found this out, when I was testen the above problem. I tried using $_SERVER['document_root'], I tried hardcoding the path, I tried all stuff (and ofcourse, checked/debugged), it just gives me: access denied (error 5). A PHP error that is. Ofcourse I've checked the permissions and security settings and even gave all the rights to user 'everyone'. Still nothing. And I can actually use PHP on the root of the site, so why can't I open it to scroll through files (for example).

 

This is both on PHP 5.3.6 and PHP 5.3.8.

 

My server is a Windows Server 2008 R2 with IIS 7.5 and PHP 5.3.6 and 5.3.8 (on 1 testing site only).

 

Please help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.