The following describes my experience getting Shindig PHP to run on Windows Vista. The IIS mentioned here onwards is IIS 7.0. Also, this article assumes that you have downloaded a copy of Shindig PHP (snapshot 1.1) here or via the SVN repository at http://svn.apache.org/repos/asf/incubator/shindig/trunk/.
To run Shindig PHP under IIS, you will first need to install PHP on your PC and configure FastCGI support on IIS. You can either choose the easy, fast and magical way or the not so easy I-want-to-be-in-control way. The easy method is via the Microsoft Web Platform Installer. You can read a blog entry on how to do this here. For the other method, you can use the guide found here. I chose the magical way and while I was at it, I got Wordpress installed as well.
By default, Web PI installs PHP in "C:\Program Files\PHP". You may need to modify the file php.ini to change the setting fastcgi.impersonate=1 to fastcgi.impersonate=0, if your PHP crashes later :). Also, while it is entirely possible to run Shindig under a virtual directory as the objective here is to get shindig running IIS in the simplest and most compatible way.
IIS Configuration
1. Launch IIS Manager (under Control Panel -> Administrative Tools)
2. Create a new website, right click sites, "Add Web site ...". You can use the following settings
Site name:
|
shindig
|
| Physical path: |
C:\inetpub\wwwroot\shindig (The folder where you have put your shindig PHP installation) |
| Host name: |
localhost |
| Port: |
8080 (or any port not currently in use)
|
A warning may pop up, warning you about creating a duplicate binding. Just say yes and continue. It just means you can't have multiple sites running on localhost on the same port. Ideally, you should have a domain name you could use for your hostname.
3. Select your new web site, and double click on the "URL Rewrite" icon. Select "Import Rules ... " and go to your Shindig PHP installation folder and open the file".htaccess". Click "Import" and then apply the newly created rule and we are done for IIS configuration.
Shindig PHP Configuration
1. There's nothing you have to do here specifically to get shindig running under IIS. Now you can have some fun with your shindig by trying out the following urls. Some of the examples may not work properly, as you may have to update the paths in some of the javascript examples.
- http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml (use &nocache=1 to prevent shindig from caching failed responses)
- http://localhos:8080/gadgets/files/container/sample1.html
- http://localhost:8080/gadgets/files/container/sample2.html
Now, this will definately kill off some interest in .NET implementations of Shindig. A little strange from Microsoft but it seems like a move to promote the use of their Web Platform Installer and indirectly for Windows Azure, their cloud computing platform. Web PI seems like a good way to promote open source projects as it provides an easy to use interface for almost anyone to install software packages. Hopefully, Murphy's Law on "Build a system that even a fool can use, and only a fool will use it." doesn't apply here. :)
The next article will be on getting Partuza running under IIS.