Solved

PHP 403 errors

Posted on 2006-10-19
18
691 Views
Last Modified: 2008-02-01
We just added t more boxes to an IIS 6.0 web farm. (there are 4 others in this farm) These two boxes give 403 foridden erros for anything that is php . We are shared hosting , so there are several thousand sites on this farm.

What can cause this problem with PHP only????


thanks
0
Comment
Question by:andrew_89
  • 10
  • 8
18 Comments
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
I've not dealt with IIS farms - but have delt with PHP on IIS.

Check to make sure that the application maping is set correctly to handle php.
Internet information services -> properties
master Properties -> Edit
Home Directory tab -> Appplication Settings section -> configuration button
Somewhere in that list should have .php mapped to the php exe like c:\php\php-cgi.exe

Like I said - I don't know if this is even remotely close - but that is how I got it working on IIS.

Rob
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
Yes this is listed as c:\php\php.exe
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Does the web user have access to run this program?  IUSR_xxx iWAN_xxx Read & Execute.

I had to add permissions to various dll files as well since the cgi calls otehr libraries.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Sorry - IWAN should be the IWAM - Launch IIS Process Account
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
Yes all the permssions look athe same on all the boxes. I cant seem to find where the difference is between the boxes that are working and the 2 that will not.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
403 is a permission issue - so then it comes down to who has permission to view?

If you have a domain admin account - can you set up a folder that only that account has access to and log in - does the php parser run then?  

How does a farm treat a domain IUSR_ account?  does each box get one - or is it shared across all boxes?
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
If I put a test.php file in the root which has administrator as user... PHP works fine. At the root of the website folder all boxes are usign the same IUSR account.

0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
I know you are correct , it is definitely some permssions issue.... It is not related to anything that has to do with metabase... We have scripts that replciate the metabase from a "head box" to all the other boxes hourly, as well as some registry keys because of Front Page.

3 of the boxes work so this rules out metabase and has to be ntfs.. Just cant figure out where.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Can you review the logs on the failing boxes?  What user is attempting to access the files?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Author Comment

by:andrew_89
Comment Utility
I see nothing in the security event logs or PHP logs??
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Odd.  It should record the 403 event.
Not system or application Event log - but IIS logging.  You may have to turn it on.

Internet information services -> properties
master Properties -> Edit
Web Site Tab->Enable Logging checkbox
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Please forgive me if you know that already - just trying to narrow things down.
Like I said - I've never dealt with server farms or system redundancy so I don't know if the logs even work differently.
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
Here is what I have done to troubleshoot as far as logs go:

I have added an entry for a probelm site in the local hosts file. ( This will ensure that the get is executed on local box)
I have a command window open and am doing a tail -f on the C:\WINDOWS\system32\LogFiles\W3SVC\ex061019.log
When I open the browser and get the 403 error there is no activity in the log?????
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
sorry I missed the output. Herre is what the IIS logs are saying on this request.

2006-10-19 21:56:38 W3SVC296528416 IIS01101 127.0.0.1 GET /test.php - 80 - 127.0.0.1 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) - - dmat.domain.com 403 19 1314 1702 322 0
0
 
LVL 9

Accepted Solution

by:
Rob_Jeffrey earned 500 total points
Comment Utility
That is of no real help for me.  I was actually hoping to see what the user was that the service was logging in as there.
I just checked IIS logs on my server and don't see anything that would help us out.

The folder that houses the php files - does the internet service user have read & execute permissions there as well as for the PHP exe?
So basically - can test.php be executed?  

Quick test is to simply grant all rights to Everyone for the one file.  You can always delete the file and make it again to ensure security.
If it works - move it around to other folders and see if it still works.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
Were you able to get it going? (Thanks for the points)
0
 
LVL 1

Author Comment

by:andrew_89
Comment Utility
The problem was that the network service account that the applciation pool was running as was not working. Somehow during the process of building this server this account was corrupted.
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
Comment Utility
I am glad you figured it out.

Thanks again.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now