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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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