Jump to content


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


PHP script access problem in protected directory

Recommended Posts

I am running into a problem accessing certain php scripts on my webserver. Any help is appreciated.

- PHP 5
- IIS 5.0
- Windows 2000 Server

I have setup a directory 'admin' that I have put my HTML pages that perform administrative functions for the website. I have setup IIS to utilize Windows security for access to these pages. In Windows I have given specific individuals and administrators access to this folder and all child objects. When I attempt to access an HTML file in the admin folder via a browser, the browser rightfully requests credentials. If I use one of the individuals' account that has permissions they are able to access the HTML file. From there, however, if they attempt to access a php page from within the same folder they are again asked for credentials, however, their credentials are not sufficient to access the php file, even though I've given them "Full Access" privileges for everything. The only way I can access the php files is to use an administrators account.

Problem Solving Steps:
In order to figure out what the problem was, I started by allowing anonymous access to the folder in IIS. Since the permissions still exist on the folder through Windows, no access is allowed, even to the HTML docs. So, I remove the restricted permissions and give Full Access privileges to Everyone. Then I can access anything in the admin folder. I then attempted to re-establish the restricted access to the folder via IIS by again setting up the folder to use Windows authentication, but still keeping the privileges for Everyone from within Windows. Now, anyone can access the HTML pages within the folder, but as soon as you attempt to access a PHP script in that folder, the authentication window comes up and administrator credentials must be provided in order to get access. To test the scripts themselves, I copied them from the protected folder into a non protected folder, and anyone can access them.

Any ideas on how to solve this problem? Any help is appreciated.

Share this post

Link to post
Share on other sites


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.