Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP 403 errors

Posted on 2006-10-19
18
Medium Priority
?
716 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
18 Comments
 
LVL 9

Expert Comment

by:Rob_Jeffrey
ID: 17766894
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
ID: 17766935
Yes this is listed as c:\php\php.exe
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
ID: 17767079
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 9

Expert Comment

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

Author Comment

by:andrew_89
ID: 17767283
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
ID: 17767310
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
ID: 17767524
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
ID: 17767581
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
ID: 17767615
Can you review the logs on the failing boxes?  What user is attempting to access the files?
0
 
LVL 1

Author Comment

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

Expert Comment

by:Rob_Jeffrey
ID: 17769209
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
ID: 17769250
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
ID: 17770127
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
ID: 17770179
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 1500 total points
ID: 17770668
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
ID: 17821468
Were you able to get it going? (Thanks for the points)
0
 
LVL 1

Author Comment

by:andrew_89
ID: 17821473
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
ID: 17821484
I am glad you figured it out.

Thanks again.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

722 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