<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>PHP Community</title><link>http://forums.iis.net/1102.aspx</link><description>A forum for the PHP community running on IIS</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: PHP default document (index.php) displaying code as plain text</title><link>http://forums.iis.net/thread/1906241.aspx</link><pubDate>Mon, 08 Jun 2009 21:57:14 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906241</guid><dc:creator>brashquido</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906241.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1102&amp;PostID=1906241</wfw:commentRss><description>Double check that you haven&amp;#39;t got Windows Explorer set to hide extensions for known file types. It could be possible that your are seeing the index.php file that you created, which is actually index.php.txt because the true file extension is being hidden.&lt;br /&gt;</description></item><item><title>PHP default document (index.php) displaying code as plain text</title><link>http://forums.iis.net/thread/1906168.aspx</link><pubDate>Mon, 08 Jun 2009 13:52:18 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906168</guid><dc:creator>soneill</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906168.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1102&amp;PostID=1906168</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I just setup PHP 5.2.9 on IIS 7 on Windows Server 2008 SP2. Most everything seems to be working fine -- PHP is running great, just about all PHP code runs perfectly... EXCEPT for &lt;b&gt;default pages&lt;/b&gt;.

Any default document (index.php) is not interpreted by PHP and the page merely displays the underlying PHP code.&lt;/p&gt;&lt;p&gt;Best Example -- two pages (index.php + phpinfo.php) with the exact same code:&lt;br /&gt;&lt;i&gt;&amp;lt;?php phpinfo(); ?&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;http://mysite.com/test/ --&amp;gt; &amp;quot;&amp;lt;?php phpinfo(); ?&amp;gt;&amp;quot; (displayed in plaintext)&lt;br /&gt;http://mysite.com/test/index.php --&amp;gt; &amp;quot;&amp;lt;?php phpinfo(); ?&amp;gt;&amp;quot; (displayed in plaintext)&lt;br /&gt;http://mysite.com/test/phpinfo.php --&amp;gt; Proper &amp;quot;blue/gray&amp;quot; PHP Info page&lt;/p&gt;&lt;p&gt;What&amp;#39;s strange is: the root of my site (http://mysite.com) interprets PHP just fine via its default document, index.php.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve set up the site via the &amp;quot;best practices&amp;quot; (iis.net/fastcgi/configuration). PHP is running via FastCGI. Index.php is the only default document type. &amp;quot;Mysite&amp;quot; is housed in a subdirectory off the root drive, and IUSR has permissions throughout. Handler Mappings shows PHP via FastCGI as the top entry for *.php.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Been Googling this for &lt;span style="font-weight:bold;"&gt;hours&lt;/span&gt;, have seen others with very similar problems, but no resolution.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;Thanks,&lt;br /&gt;SEAN&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>