We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

PHP 403 errors

andrew_89
andrew_89 asked
on
Medium Priority
768 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
Comment
Watch Question

Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
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

Author

Commented:
Yes this is listed as c:\php\php.exe
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
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.
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
Sorry - IWAN should be the IWAM - Launch IIS Process Account

Author

Commented:
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.
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
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?

Author

Commented:
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.

Author

Commented:
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.
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
Can you review the logs on the failing boxes?  What user is attempting to access the files?

Author

Commented:
I see nothing in the security event logs or PHP logs??
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
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
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
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?????

Author

Commented:
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
IT/Programming
CERTIFIED EXPERT
Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
Were you able to get it going? (Thanks for the points)

Author

Commented:
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.
Rob_JeffreyIT/Programming
CERTIFIED EXPERT

Commented:
I am glad you figured it out.

Thanks again.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.