Scott Hanselman

Screencast HowTo: IIS7 and PHP with FastCGI

October 24, 2007 Comment on this post [26] Posted in ASP.NET | IIS | Screencasts | Silverlight | Speaking
Sponsored By

iisfastcgiphpHello Dear Reader. I have been working with IIS7 for a while and I'm convinced that it's the cat's pajamas[1]

I started playing with IIS7 and noticed that it had FastCGI support. This means I could plug in PHP or maybe Perl or even Ruby into IIS7. This would be nice because I could host my ASP.NET blog, but also drop in some of the nice open source PHP applications that are available for maybe a photo gallery or something, all hosted on the same IIS machine.

What I did was take Bill Staples blog post on FastCGI as a guideline and got IIS7, FastCGI and PHP running on my machine. I did three load tests, one with CGI, one with FastCGI and one with Kernal Output Caching (new IIS7 feature) turned on. This video shows a number of tools and how to configure IIS7 step by step.

You can watch the video/screencast on the new Hanselman Silverlight Player (thanks Tim!) or download the WMV directly. If you guys want more IIS7 videos in detail, give me feedback in the comments and I'll see what we can do about putting together a series over on http://www.iis.net.

FastCGI GoLive on IIS6

If you're running IIS5.1 or IIS6, there is a GoLive release available to put your PHP apps into production on IIS and FastCGI. If you've previously downloaded the FastCGI TP2 release, be sure to get the latest GoLive version for IIS5.1/6.

There's also an actively maintained FastCGI IIS Forum with members of the team and MVPs helping out.

FastCGI for IIS7

If you're running IIS7 on a non-SP1 Vista, you can get FastCGI as a download for x86 and x64 as well. However, if you're running Vista SP1 Beta, as I am in the video, or Windows 2008 RC0, then you've already got FastCGI. One less step, eh? Check it out in the video.

WCat (Web Capacity Analysis Tool) 6.3

In this video I use a tool call WCat that you can download in x86 and x64 flavors. It is very lightweight and can simulate thousands of concurrent users on even a laptop. I pushed my local IIS7 with caching to over 2000 requests a second. It's free, easy with a basic scripting language. It's a great way to beat on your development servers and do some powerful profiling. I loves me some free tools.

Screencast Survey

I have been thinking about doing a series of IIS7 screencasts to augment the very good articles on http://www.iis.net. If you haven't been over there, I recommend you check it out.

Anyway, if you've seen me speak on stage, you know I'm a visibility/accessibility wonk and I really like to think about how folks learn, etc. I've been working with Camtasia for a while now and doing some video editing in Sony Vegas. In the recent ALT.NET Videos I put myself in PIP (Picture in Picture) and the response (even though the video was very rough) was very positive. I think that PIP really adds a lot to a screencast, but only if combined with appropriate editing, callouts, zooming and moving/sizing of the PIP window to make sure nothing is obscured. I wonder if you agree?

I'm interested in both your thoughts and opinions on the FastCGI stuff but also on Screencasts in general:

  • I'd also like to try creating screencasts that look great at 640x480 but also would be viewable on a 320x240 screen using Zoom and Pan or a Viewfinder technique. Do you have any interest in that?
  • Are screencasts a big part of your learning process?
  • Does Picture in Picture add value to you?
  • Do you prefer a fairly casual screencast with PIP like I've done here, or a more formal greenscreen/floating head with a nice suit reading a script. This screencast was fairly "organic" on purpose because it's real. There's no fakery.

Thanks, Dear Reader.


[1] Cat's Pajamas - An adjective used by hipsters of the 1920's to describe a person who is the best at what they do. lso used to describe another person who is genial and fun to be with.
"Martin sure knows how to dance, he's the cats pajamas, man!""

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
October 24, 2007 8:31
Great video Scott... good to see you getting into a bit of video evangalism :-)

I really like the format, raw enough to feel real, and very hands on - so you are showing a lot of the little things that are fiddly and hard to do. Very useful indeed!

Having your face displayed in the corner is a very personal thing, I liked that too. I think that it adds some credibility to video when you can actually see the person who is presenting like that.

Thanks!
October 24, 2007 10:52
Absolutely love your webcasts so please keep it up!

You're speaking skills really make your webcasts much more valuable than others I have watched. Hearing the presenter say "Uhh, and ummm" too often makes you lose interest rather fast.

I personally can do without the PIP. The personal touch is nice, but I think I would rather see the full screen.
October 24, 2007 11:41
I really dig the screencasts Scott, and definitely prefer the casual presentation approach. Still not sure on the PIP though. Since it's silverlight maybe you could set it up so the user can turn the PIP on or off?
October 24, 2007 11:57
Feedback on screencast: thanks for the download, I still prefer it. PIP is only interesting when there is no focus on the application. So maybe only in the intro/outro and when you are talking without typing or clicking for some time.
October 24, 2007 15:54
Feedback on PIP: What mike said, I like the PIP when the screen is something like a power point slidshow, but when the focus is an demo or app the PIP should be removed.
October 24, 2007 18:00
PIP works for me - I like it. It's perhaps not so beneficial for short pitches where it's just the speaker's head that is in shot. But, for longer sessions, where there is gesticular action and emotive expression towards the audience, it really does come into it's own. Dare I say it here, I watched a well-produced PIP Google TechTalk (Merlin Mann, Inbox Zero) - PIP helped a lot, especially with the Q&A in the latter half of the session. However, the production time must eat into the value of the video vs the video+PIP - Google's example saw the PIP float to suit the slide deck and what was actually being said.

Whilst I've yet to catch the wave, I'm not a huge fan of the Facebook-style videos where folks are simply sitting at their computer...which is what prompted my earlier statement re: head shots. However, if you are an emotive presenter, head/shoulders shots may well have good value - so please do experiment with them, I'd be keen to see the results.
October 24, 2007 18:05
I second Kevin Isom. No, I don't find your face repugnant! In fact the personal feel of th e PIP is not bad. But making a visiblity toggle option for the PIP would be super sweet.
October 24, 2007 18:13
no pip
October 24, 2007 19:49
I much prefer anything over the handheld, gonzo journalism style where the camera swings from presenter to screen. Fortunately, that style seems to be fading away.

PIP is good where it makes sense. If the presenter is reading notes or watching the computer while manipulating the presentation, that's not so interesting. But I agree with others who ask for options. If possible, it would be good to be able to toggle it. I also like the idea of the video itself removing it when something truly full-screen starts to happen.

Seeing the person helps those of us who are not in The Inner Circle by putting a face with a name. I don't get to many conferences, so most of the luminaries are just names to me.
October 24, 2007 21:20
Great learning video on FastCGI. PIP works really good for me as it adds a personal touch to the screencast.

On your screencast questions
2. yes, screencasts are a big part of my learning process and would like to see more as it rapidly decreases my learning curve
3. PIP is great as it adds a personal touch to the video
4. Casual screencasts are nice.

Also when I am seeing you do things live and watch every step in the process, I am able to associate with likely errors that I could make. It makes more sense when I am configuring something new.

raj
October 24, 2007 22:11
Doing the PIP toggle would be hard if I keep using WMV as a format...otherwise I would have to use two sync'ed streams.

Fading it in and out would be doable. I can try that. What about moving around the screen?

How about the size? Should it change depending on what is going on at the time? I made it larger at the very end...
October 24, 2007 22:32
i would like to see more and more about PHP .
you have a good blog that i read for a year , but i am a php developer and would like to see more blogs and podcasts at that issue .
thanks.
October 25, 2007 0:07
Like the screen casts. Love the casual PIP - it adds a lot of bandwidth to the communication from you to us. I think maybe the size could be bigger. 320x240 is way too small. Thanks!
October 25, 2007 0:10
Great screencast, and I like the PIP. It makes you feel closer to / more in touch with the speaker
October 25, 2007 0:14
The size of the video is 640x480, I think....are you saying the whole thing should be bigger or just the PIP?
October 26, 2007 16:22
Definitely like PIP if done as per your comments. I believe it keeps the user attentive.
October 27, 2007 2:50
PIP. And the size and position work for me. How did you put it together (software, technique, etc)?
October 27, 2007 14:34
Hi Scott,

On the video I noticed that when output caching was turned on, the query string was set up with qws instead of qwd. Would this mean that it would have potentially handled even more requests per second?

Chris
October 27, 2007 19:34
Crap! Yes...I'd suspect so...although that's clearly a mistake on my part, if all three URLs (as we were only hitting 3 pages) happen to have the same value for qwd, it wouldn't matter. Remember that 3 URLs appeared at the command line in the http.sys cache.
October 28, 2007 3:26
*** 320x240 - no interest from this side, but others might like it.
*** Big part of learning? No, not yet anyway. But I haven't watched many - this was good. Worth watching some more of them.
*** PIP = goodness. I didn't watch you all the time in the little PIP window, but was nice to take a peek & see what you were doing. Nice to have.
*** Casual = goodness. Seems more authentic, less scripted. More like a down & dirty, insider's late night kind of thing. The PIP helps set that mood too.


October 28, 2007 22:32
The screencast was excellent Scott - very informative. You're effectively 'fire-hosing' information down the line and I do think screencasts are a big part of learning. "A picture's worth a thousand words?" - what's a video worth? I like PIP as well although I guess it raises an interesting question of aesthetics - not sure if everyone would be able to pull it off as well as you did.

Would also love more on IIS7. Especially something non-http features - using II7 as a general purpose application server...
October 29, 2007 16:35
To echo Anthony's remarks - "not sure if everyone would be able to pull it off as well as you did". The most important piece is having something interesting to say, and saying / demonstrating it in an interesting way. Scott has both to the max.

Just for grins, I gave it a try over the weekend. Baby steps first: hooked up my webcam, my microphone, fired up Camtasia.... and oof, it wasn't pretty. The PIP audio/video were hugely out of sync. And the webcam video itself was really poor. (The audio was in sync with the screen capture, but not with the webcam feed.)

Hey Scott, what's the secret to keeping the webcam video so sharp and in sync with audio? Beefy machine? I look as though I'm broadcasting from the space shuttle - jerky video, out of sync audio. What brand / model of webcam are you using?

Thanks!
October 29, 2007 20:32
bliz - All my machines are beefy so I'm not sure what it would do on a low-end machine. All my cameras are LifeCams. Probably fast hard drive more than fast computer.

Also, lower your res to 1024 and turn off Aero.
October 29, 2007 23:18
Thanks Scott.

I dropped the res down to 1024 (already had Aero off). That helped out the PIP video / audio sync issue a bunch. Plus, the LifeCam image is nice & sharp. (I was trying an older webcam before - just no good.)

Here's what I've ended up with: 1024 monitor display (no Aero). LifeCam for good PIP video. LifeChat headset for good audio.

My LifeCam audio playback is about an octave lower than my normal voice. Very odd. Also the Cam picks up clicking sounds - I can't hear it in the room, must be electronic interference from somewhere. There's something to be said for using a beefy machine, but with this configuration I can do OK recording a VPC with PIP on my laptop.

October 31, 2007 12:41
To answer your questions:

1) The "How do I" screencasts on MSDN can be downloaded in Zune format. I like that a lot!!!
2) Yes, screencasts are a big part of my learning process. Although I use PowerPoint almost every day, I hate them in webcasts. People talk waaay too long and introduce WCF (for example) every time, even in lvl400 sessions, sort of speak.
3) It does tremendously for webcasts where there's a lot of slides. When you're doing coding, it's a lot less neccesary.
4) I like the casual screencasts. And the short ones. Go into detail immediatly and explain why you're doing stuff as you go. Don't introduce yourself or every bit of technology you're using, because the people watching those screencasts already know. When people want to know more, they go to a training.
November 08, 2007 1:50
I liked both the screencast and the PIP. I also liked that it was this easy to setup PHP on IIS.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.