Well error 500 is one of those catch-alls that mean very little when it comes to fixing the problem.
I found this when I googled
"HTTP 500 - Internal server error
Internet Explorer
This problem occurs because there is an error processing the ASP script and "Friendly HTTP error messages" are enabled in Internet Explorer which do not allow you to see the details of the problem.
Solution(s):
In IE, turn off Friendly HTTP error messages by choosing tools - internet options - advanced. Then you should get the real error message and line number of the error. "
At a guess then, you have an error in your PHP script. But that error may arise because of IIS config problems, not real coding errors. Do you have another environment where you can test the PHP code? If you can then you may be able to at least prove if it is a server config error or your code.