<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.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>BillS IIS Blog : Samples &amp;#38; Demos</title><link>http://blogs.iis.net/bills/archive/tags/Samples+_26002300_38_3B00_+Demos/default.aspx</link><description>Tags: Samples &amp;#38; Demos</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Introducing IIS Stats v1.0 for Windows Sidebar</title><link>http://blogs.iis.net/bills/archive/2006/11/08/introducing-iis-stats-v1-0-for-windows-sidebar.aspx</link><pubDate>Wed, 08 Nov 2006 09:03:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1456886</guid><dc:creator>bills</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/bills/rsscomments.aspx?PostID=1456886</wfw:commentRss><comments>http://blogs.iis.net/bills/archive/2006/11/08/introducing-iis-stats-v1-0-for-windows-sidebar.aspx#comments</comments><description>&lt;p&gt;&lt;img src="http://wallpaper.iis7.org/sidebar/sideBar-iis.jpg" style="padding:10px;" align="right"&gt; &lt;/p&gt;&lt;br&gt;
&lt;p&gt;My &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=b88c867c-5524-4f78-bb39-0ba33370adbf&amp;amp;l=1" target="_blank"&gt;first experiment&lt;/a&gt; with building a Windows Sidebar gadget was more &lt;a href="http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx" target="_blank"&gt;for show&lt;/a&gt; than anything.&amp;nbsp; Launching perfmon (or any other path) is hardly a good use of Sidebar screen real estate.&amp;nbsp; Regardless, it was a good excuse to try out Windows sidebar development, and have something flashy to show in my PHP demo.&lt;/p&gt;
&lt;p&gt;Over the weekend I decided to build something more useful, and with all the roads in and out of my city completely flooded today, I took the opportunity to finish it tonight and make it available for download.&amp;nbsp; I'm calling it&lt;b&gt; IIS Stats &lt;/b&gt;(ok the name sucks).&amp;nbsp; Like most&amp;nbsp;v1.0 efforts, it&amp;nbsp;is pretty minimal, but hopefully useful enough to catch your interest.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;IIS Stats Sidebar Gadget v1.0&lt;/h3&gt;
&lt;h4&gt;Requirements:&lt;/h4&gt;
&lt;p&gt;-IIS7 must be installed&amp;nbsp;&lt;br&gt;-you must run Sidebar elevated, or disable UAC (not recommended)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Features:&lt;/h4&gt;
&lt;p&gt;-launches "IIS Manager" on click&lt;br&gt;-shows total "get" requests for your server since boot&lt;br&gt;-shows current requests per second (RPS) for all sites&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Important note:&lt;/b&gt; to run sidebar elevated you must first close sidebar, then click start-&amp;gt;all programs-&amp;gt;accessories then "right click" on "Windows Sidebar" and choose "Run as Administrator".&amp;nbsp; This will enable the gadget to use the WMI scripting interface to get performance counter information to display in the gadget.&amp;nbsp; Doing this will cause Windows Sidebar, and all gadgets that are running, to have Administrators privledges.&amp;nbsp; This is not a good security practice, but unfortunately it is a requirement until the Sidebar team improves their APIs to provide greater access to performance information of the machine.&amp;nbsp; As far as I can tell, the built-in APIs only support accessing CPU, memory, and wireless network status (note the built-in gadgets).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The Code: &lt;/b&gt;if you'd like to inspect the code for this gadget (and borrow it for your own project), install the gadget then browse to the c:\users\&amp;lt;your user name&amp;gt;\appdata\Local\Microsoft\Windows Sidebar\Gadgets\IISStats.gadget&amp;nbsp;and check out the gadget manifest: gadget.xml and the StartIISStats.html file.&amp;nbsp; Inside the StartIISStats.html file you'll see some very basic vbscript / jscript which performs the actions of the gadget.&amp;nbsp; &amp;lt;&amp;lt;insert long explanation here as to why I use both JScript and VBScript&amp;gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Disclaimer:&lt;/b&gt; This is something I built for fun on my own spare time.&amp;nbsp; It is not a Microsoft product, and I am not responsible for your use of this gadget, and any potential harm it causes you.&amp;nbsp; Use at your own risk!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Install instructions:&lt;/b&gt; You can download IIS Stats Sidebar Gadget from &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=3a67cbad-4435-420a-a4af-0cec121b7593&amp;amp;l=1" target="_blank"&gt;gallery.live.com&lt;/a&gt;.&amp;nbsp; In order to install the gadget, download it to your desktop, rename the file from IISStats.zip to IISStats.gadget.&amp;nbsp; Then double click on the icon.&amp;nbsp; This will automatically install it into your sidebar.&amp;nbsp; Enjoy!&amp;nbsp; If you like it, or have ideas on how to enhance&amp;nbsp;the gadget,&amp;nbsp;be sure and &lt;a href="http://blogs.iis.net/bills/archive/2006/11/08/introducing-iis-stats-v1-0-for-windows-sidebar.aspx" class=""&gt;leave a comment&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Known issues: &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;- &lt;/b&gt;if you take a look at the code, I'm dividing the results I get from WMI for GetRequestsPerSec by 3.&amp;nbsp; Why?&amp;nbsp; Because the number was consistently 3x higher than what I observed in perfmon or Wcat.&amp;nbsp; Why?&amp;nbsp; I have no idea... but I'll look into it more.&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;if you make a request to &lt;a href="http://localhost/"&gt;http://localhost/&lt;/a&gt; and you have the default IIS page installed, you will notice the total requests increments three times.&amp;nbsp; You may think this is a related performance counter issue - after all - you&amp;nbsp;just made one request, right?&amp;nbsp;&amp;nbsp;Wrong.&amp;nbsp; You made three requests.&amp;nbsp;&amp;nbsp;The first request you made was for &lt;a href="http://localhost/"&gt;http://localhost/&lt;/a&gt;&amp;nbsp; Internally, IIS looks up the defaultDocument for that request&amp;nbsp;and then executes the request again for iisstart.htm (that is the second request).&amp;nbsp; The iisstart.htm file references the welcome.png file, which IE&amp;nbsp;requests, making the third request.&amp;nbsp; You can prove the&amp;nbsp;counter is working properly by requesting &lt;a href="http://localhost/welcome.png"&gt;http://localhost/welcome.png&lt;/a&gt; directly, and seeing the counter increment only once.&amp;nbsp;&amp;nbsp;Also, hold down&amp;nbsp;"F5"&amp;nbsp;in the browser and see how many RPS you can generate.&amp;nbsp; Weee! fun!!!&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1456886" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/bills/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/bills/archive/tags/Samples+_26002300_38_3B00_+Demos/default.aspx">Samples &amp;#38; Demos</category></item><item><title>How to install PHP on IIS</title><link>http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx</link><pubDate>Wed, 20 Sep 2006 01:36:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1404389</guid><dc:creator>bills</dc:creator><slash:comments>47</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/bills/rsscomments.aspx?PostID=1404389</wfw:commentRss><comments>http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;*Updated Recommendations - Please read the following instructions for running PHP fast and reliably*&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The FASTEST and EASIEST way to install PHP on IIS is using Microsoft’s Web Platform installer.&amp;#160; It completely automates setting up IIS, FastCGI and the latest version of PHP from the php.net site.&amp;#160; To install it, just click this button:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/web/gallery/install.aspx?appsxml=www.microsoft.com%2Fweb%2Fwebpi%2F2.0%2FWebProductList.xml%3Bwww.microsoft.com%2Fweb%2Fwebpi%2F2.0%2FWebProductList.xml%3Bwww.microsoft.com%2Fweb%2Fwebpi%2F2.0%2FWebProductList.xml&amp;amp;appid=201%3B202%3B203"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wpiBadgeGreen" border="0" alt="wpiBadgeGreen" src="http://blogs.iis.net/blogs/bills/wpiBadgeGreen_61E6BD0F.png" width="176" height="51" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you don’t have Web PI v2 installed, you will be prompted to install it.&amp;#160; Once installed, the tool will launch.&amp;#160; You can either navigate to the “Web Platform” tab and select “PHP” under “Framework and Runtimes” customize link, or close your browser, re-open to this blog and click the button again to launch the tool directly into PHP install.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For step-by-step instructions on how to install PHP on &lt;strong&gt;IIS6 (Windows 2003)&lt;/strong&gt; with the new Microsoft FastCGI module, see &lt;a title="Configuring FastCGI Extension for IIS 6.0" href="http://learn.iis.net/page.aspx/248/configuring-fastcgi-extension-for-iis60/"&gt;Configuring FastCGI Extension for IIS 6.0&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;For step-by-step instructions on how to install PHP on &lt;strong&gt;IIS7 (Windows Vista SP1 and Windows 2008)&lt;/strong&gt; see, &lt;a href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/"&gt;Using FastCGI to Host PHP Applications on IIS 7.0&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My original blog post follows below and provides instructions for how to install IIS7 on Vista (RTM) using the ISAPI-based PHP.&amp;#160; I strongly recommend you upgrade to Vista SP1, however, and use the &lt;a href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/"&gt;Using FastCGI to Host PHP Applications on IIS 7.0&lt;/a&gt; instead.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is a step-by-step guide for &lt;strong&gt;Vista RTM:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;1) Download PHP from &lt;a href="http://www.php.net/downloads.php" mce_href="http://www.php.net/downloads.php"&gt;&lt;font color="#9f874b"&gt;http://www.php.net/downloads.php&lt;/font&gt;&lt;/a&gt;.&amp;#160; I get the zip package because I think it is just as easy, and gives me control over setup.&lt;/p&gt;  &lt;p&gt;2) Unzip the php...zip file to your drive.&amp;#160; I usually unzip it to C:\php&lt;/p&gt;  &lt;p&gt;3) Copy the c:\php\php.ini-dist file to c:\windows\php.ini.&amp;#160; Tweak it as needed.&lt;/p&gt;  &lt;p&gt;4) &lt;a href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=957" mce_href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=957"&gt;&lt;font color="#9f874b"&gt;Install IIS7&lt;/font&gt;&lt;/a&gt;, making sure you install the ISAPI Extension component (for PHP-ISAPI - which is what I use) or the CGI component (if you prefer CGI) during IIS installation (ISAPI and CGI are *not* installed by default)&lt;/p&gt;  &lt;p&gt;5) Open the IIS Manager (C:\windows\system32\inetsrv\inetmgr.exe&lt;/p&gt;  &lt;p&gt;6) Click on &amp;quot;Handler Mappings&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;img border="0" src="http://wallpaper.iis7.org/phpIsapiSetup/inetmgr.JPG.img?action=preview" width="600" height="432" mce_src="http://wallpaper.iis7.org/phpIsapiSetup/inetmgr.JPG.img?action=preview" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;(click here for &lt;a href="http://wallpaper.iis7.org/phpIsapiSetup/inetmgr.JPG" mce_href="http://wallpaper.iis7.org/phpIsapiSetup/inetmgr.JPG"&gt;full size image&lt;/a&gt;)&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;7) Click on the &amp;quot;Add Script Map&amp;quot; task on the right (in blue):&lt;/p&gt;  &lt;p&gt;&lt;img border="0" src="http://wallpaper.iis7.org/phpIsapiSetup/handlers.jpg.img?action=preview" width="600" height="432" mce_src="http://wallpaper.iis7.org/phpIsapiSetup/handlers.jpg.img?action=preview" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;(click here for &lt;a href="http://wallpaper.iis7.org/phpIsapiSetup/handlers.jpg" mce_href="http://wallpaper.iis7.org/phpIsapiSetup/handlers.jpg"&gt;full size image&lt;/a&gt;)&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;8) Fill in the dialog box like this:&lt;/p&gt;  &lt;p&gt;&lt;img border="0" src="http://wallpaper.iis7.org/phpIsapiSetup/onlyscriptMap.JPG" width="461" height="372" mce_src="http://wallpaper.iis7.org/phpIsapiSetup/onlyscriptMap.JPG" /&gt;&lt;/p&gt;  &lt;p&gt;9) Pause to enjoy this handy dialog box that I had added late in RC1 just for you, then click &amp;quot;yes&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;img border="0" src="http://wallpaper.iis7.org/phpIsapiSetup/onlyExtensionRestriction.JPG" width="480" height="172" mce_src="http://wallpaper.iis7.org/phpIsapiSetup/onlyExtensionRestriction.JPG" /&gt;&lt;/p&gt;  &lt;p&gt;If you click &amp;quot;Yes&amp;quot; it will automatically register this ISAPI /CGI with the extension restriction list - the feature we added in IIS6 to prevent unauthorized executables from running on the server.&amp;#160; This saves time, and considering the fact that you're adding the scriptmap, it's a safe bet you want it to run. :)&lt;/p&gt;  &lt;p&gt;10) go to your C:\inetpub\wwwroot directory and create a test.php page.&amp;#160; You can use the simple &lt;/p&gt;  &lt;p&gt;&amp;lt;?php&amp;#160; phpinfo();&amp;#160; ?&amp;gt;&lt;/p&gt;  &lt;p&gt;function to test if PHP is working correctly.&amp;#160; &lt;/p&gt;  &lt;p mce_keep="true"&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p mce_keep="true"&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Adddendum: several people have commented below that they are having problems getting PHP sessions to work on IIS7/Vista.&amp;#160; Please see &lt;a href="http://blogs.iis.net/bills/archive/2006/10/18/loadUserProfile-and-IIS7-_2D00_-understanding-temporary-directory-failures.aspx" mce_href="http://blogs.iis.net/bills/archive/2006/10/18/loadUserProfile-and-IIS7-_2D00_-understanding-temporary-directory-failures.aspx"&gt;this post&lt;/a&gt; for more information on the issue.&lt;/p&gt;  &lt;p&gt;Another note: PHP users may wish to try out the recently announced FastCGI support from Microsoft for improved reliability and performance.&amp;#160; See &lt;a class="class" href="http://blogs.iis.net/bills/archive/2006/10/31/IIS-Team-Announces-FastCGI-For-IIS-5.1_2C00_-IIS-6.0-and-IIS7.aspx" target="_blank" mce_href="http://blogs.iis.net/bills/archive/2006/10/31/IIS-Team-Announces-FastCGI-For-IIS-5.1_2C00_-IIS-6.0-and-IIS7.aspx"&gt;this post&lt;/a&gt; for more information on the announcement, and &lt;a class="class" href="http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx" target="_blank" mce_href="http://blogs.iis.net/bills/archive/2006/10/31/PHP-on-IIS.aspx"&gt;this post for a demo&lt;/a&gt; of the new feature.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.iis.net/photos/billsblogpics/picture1404383.aspx" target="_blank" mce_href="http://blogs.iis.net/photos/billsblogpics/picture1404383.aspx"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=1404389" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/bills/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/bills/archive/tags/PHP/default.aspx">PHP</category><category domain="http://blogs.iis.net/bills/archive/tags/Samples+_26002300_38_3B00_+Demos/default.aspx">Samples &amp;#38; Demos</category><category domain="http://blogs.iis.net/bills/archive/tags/IIS+News+Item/default.aspx">IIS News Item</category><category domain="http://blogs.iis.net/bills/archive/tags/Developers/default.aspx">Developers</category><category domain="http://blogs.iis.net/bills/archive/tags/Administrators/default.aspx">Administrators</category></item></channel></rss>