I'm running IIS7 and I have fastCGI installed and php code works just fine normally.

Today I added a php file that contained only code an no html to the bin directory. And when I try to access it via http, i get a 404 back.

I've verified the file is on the server, and I've verified that the problem goes away if I move the file out of the bin directory.

My question is why does the bin directory hide php files? (and html files too, incidentally.) Is it some IIS security precaution? If so, what's the risk?

thanks.

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

The /bin directory is normally protected by IIS by default (well, not by IIS, but by ASP.NET technically). This is done because ASP.NET apps store their dlls in that folder.

Here's a post with some more details and a workaround:

http://www.eggheadcafe.com/software/aspnet/30510465/iis-60-generating-4041-error-for-bin-subdirectory.aspx

link|improve this answer
thanks. that makes sense. dlls are only used on the server side so why expose it to the web and let people download your dlls willy nilly. – robertpateii Oct 14 '10 at 21:28
feedback

404 means IIS couldn't find the file.

To get more specific information I would look at the IIS error log. See http://serverfault.com/questions/84833/iis-7-log-file-directory

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.