Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm going to answer my own question here, but I thought this might be important enough to post so that it would be indexed for the next person who runs into my situation.

Problem: I can not seem to get PHP code to execute on a x64 bit version ofIIS7, whether it be in my desktop, Windows 7, or the application's final destination on Windows Server 2008. Every time I try and look at a test php document to confirm installation, I only see the source code.

I've followed the documentation from PHP, from, blogs, howtos, just about anywhere I can find that Google would send me. I tried the web installer, tried manual installations instead of the MSI, tried version 5.3.5, tried version 5.2.17, but no matter what, the code would never execute. I even tried registering .eric files with PHP FastCGI Module, but same result, php source code only.

share|improve this question

After about an hour or two a day for 5 days trying to figure this out, I started walking through the php.ini file.

Being a usual LAMP user, I always coded <? // phpcode // ?> . Always worked after a fresh install on LAMP.

With IIS/Windows installer of PHP, <? (short tags) is turned off to avoid conflicts with ASP.

Once I added <?php //phpcode ?>, everything worked!

share|improve this answer
Thank you for posting the answer. Being try to find a solution for a good few hours. All works now! – user73968 Mar 10 '11 at 19:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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