Well, if there's a problem with your PHP code, then you should get a PHP error, not an IIS error. PHP generates its errors as HTML, so that regardless of how your PHP script runs, the web server still serves up a web page.
If you're running into IIS problems, I'd double check the permissions and file extensions to make sure everything's configured okay.
Here's a silly question: Do other PHP scripts work properly?
Take care,
Nik
http://www.bigaction.org/