The migration is finally complete. This site is now on Windows 2008 courtesy of Softsys hosting. It’s running a little sluggish now, but, that aside, all other issues have been resolved. I got the impression that this was the first time they had really used Windows 2008. That may sound harsh, but until my migration, they’d never setup something as simple as a custom php.ini file.
But, that said, their support team is extremely responsive so I forgive them.
The reason I switched to Server 2008 was to take advantage of the native URL rewriting capabilities in IIS 7. While handled fundamentally different than mod_rewrite, the same effects can be accomplished. This is important to me since I run WordPress and desire those oh-so-sought-after pretty permalinks.
To learn how to set this up yourself, read this guide on IIS.net.
Or just add the following to your web.config file:
<rewrite> <rules> <rule name="Main Rule" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite>
It’s that easy. This obviously goes in the <configuration><system.Webserver> portion of web.config.
Now, onward and upward!
Update: It gets better/worse. (10/17/2008)
I found a number of settings that are incorrect.
- fastcgi.logging was set to 1. It is supposed to be set to 0.
- memory_limit was set to 8M. Sources I found said to set it as high as 256M. I chose 64M as this is not my server and I’d like to remain friends with my host. (Same source as above)
- Worst of all, PHP was installed with thread safety. This article from IIS.net clearly says that FastCGI handles thread safety and enabling it will decrease performance.
I have opened up a support ticket to get the last issue resolved. The other settings were modifiable from php.ini.
Current Issues I’m Working Through:
- Performance is terrible. I suspect this is due to thread safe PHP being installed. (see above)
- Almost all php errors result in a 500 error, even ones that are logged.
- URL rewriting is pushing clifgriffin.com/blah to clifgriffin.com/index.php/blah, but everything dies with a 500 error.
- Installing Permalink Validator plugin fixes above *slightly*. Bad urls results in some wordpress 404s, but URLs like clifgriffin.com/elderly fail with a 500 error. (No php errors are logged) Also, Permalink Validator breaks comment submission and some admin pages…they never come back after they submit. I’d like to know why it partially fixes the problem…might give me a clue to how to totally fix the problem.
- WordPress doesn’t seem to be able to enforce my www. preference. Going to www.clifgriffin.com does not redirect to clifgriffin.com as expected.
That’s about it. I will try to update this post when I find a solution as there seems to be very little online documentation of these types of problems.
Update: It gets better…but not with IIS (10/20/2008)
After working with softsys multiple hours each day and seeing no resolution, I decided to ditch softsys in favor of mediatemple.net. So, I’m back on unix. Which isn’t to say I have anything against IIS 7. I’m fairly confident my problems were solely configuration problems attributable to my host.
My new plan costs more but is much higher quality than any hosting service I’ve gone with in the past…so I’m excited.
#1 by Bill Staples at October 16th, 2008
Congrats on the move to IIS7! You won’t regret it.
#2 by Bill Staples at October 16th, 2008
PS, it does seem slower than it should be… you might want to make sure they have setup PHP like this: http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/ For an example of an IIS7 site running WordPress correctly, with better performance see http://ruslany.net/
#3 by clifgriffin at October 16th, 2008
Hi Bill, thanks for your comments. I believe they are using FastCGI. At least, phpinfo() seems to indicate they are. (http://clifgriffin.com/info.php)
This is one of the frustrating aspects of using shared hosting…I can’t tweak these things myself!
I notice the blog you link doesn’t handle 404s with wordpress. I have had a lot of troubles getting this to work on this site. I have it working but only partially. I had to install “Permalink Validator” which seems to only partially fix the problem. Certain bad URLs produce a blank page.
Do you have any opinions on this?
#4 by clifgriffin at October 16th, 2008
Well, scratch that. I had to disable that plugin as it seems to prevent pages like the comment submission form from redirecting after they complete.
#5 by clifgriffin at October 16th, 2008
http://clifgriffin.com/adfladfjaldfjaf
Nothing like a big 500 error to help your users find what they were looking for.
#6 by Bill Staples at October 18th, 2008
Another thing to consider: I’ve heard reports that PHP 5.2.6 has performance issues with the database drivers on Windows. You might also consider having them go back to 5.2.5 and see if it gets better.
#7 by Rob Boek at January 14th, 2009
Thanks for the post. I just signed up for Softsys Hosting a few days ago and had the same problem.
I was able to get it working by having them setup a custom php.ini file. I copied all the setting from GoDaddy’s phpinfo() and it’s working great now.
If anyone wants my php.ini settings feel free to let me know. I’ll probably write a blog post about it in a few days.
-Rob