0

I just installed PHP for IIS7 and tried running a PHP site from my localhost. I set up a virtual directory to the folder. When I browse to my index.php page I get the following error:

enter image description here

It looks like IIS still doesn't know how to process PHP. Is there more that I need to do besides installing a PHP for IIS? Do I need to modify other settings?

UPDATE Answer is to go to IIS -> PHP Manager -> PHP Settings -> search for short_open_tag. Turned it on.

dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
  • You must change the IIS settings to map PHP files with the PHP handler (just as with Apache). You could look for "PHP on IIS" on Google to find tutorials on how to do that. There seems to be a [blog post](http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx) on IIS.net about this exact issue. – rid Feb 19 '12 at 01:38

1 Answers1

1

The default install of PHP does not have short tags enabled - IE opening your code lock with a <? Instead of a <?php tag. The use of the short tags is discouraged, but if you must use them refer to this post to turn them on:

How to enable PHP short tags?

Community
  • 1
  • 1
Nathan Anderson
  • 6,768
  • 26
  • 29
  • Thanks, that was it. I turned it on by going to: IIS -> PHP Manager -> PHP Settings -> search for short_open_tag. Turned it on. – dev.e.loper Feb 19 '12 at 01:46