Go to Control Panel -> Programs and features.
Click the link for Turn Windows Features On or Off.
Expand Internet Information Services
Expand World Wide Web Services
Expand Application Development Features.
make sure all options are checked, especially ISAPI Extensions and ISAPI Filters.
to be honest, i have never been able to get php working with IIS in Windows 7. After spending 2 weeks trying to get it working unsuccessfully, I opted to install WAMP and had it working in 5 minutes, including the time to download it.
See the tutorials on the learning resources page for installing a php testing server.
resources.php