Jump to content


Photo

PHP script access problem in protected directory


  • Please log in to reply
No replies to this topic

#1 khburres

khburres
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 02 March 2006 - 12:56 PM

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

Specs:
- PHP 5
- IIS 5.0
- Windows 2000 Server

Problem:
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.
He who guards his mouth and his tongue keeps himself from calamity.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users