Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 iis.net, 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

1 Answer 1

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

 
discard

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.