I was putting a site on a production server today and found some very strange errors. At least, I thought they were a bit strange.

The Server is Windows 2003 and IIS6. This is a leased server… leased by a small business I sometimes do work for.

In the development environment I had running, it was a XAMPP set up that used Apache. I knew there could be some slight differences. But MySQL and PHP were very similar releases.

I set up the database and uploaded the code.

And I started getting Kohana_404_Exception errors. The file in question was Index.php. Which I found quite curious.

On the server, I just got that old “Internal Server Error” page with no indication of what the problem might be. Which is always fun. But luckily, Kohana was logging something and gave me something to work with.

This reminds me… and I’ll take a sec to mention… it’s something that I’ve always loved about ColdFusion. A CF Server could always be tweaked to give valuable debugging information as to what error is occurring.

I looked and looked…. went through some of Kohana’s core system files… went through the controller that was being called and a couple of model’s that were being loaded. Nothing.

I decided I’d have a go at looking at what IIS was doing. I did not have remote access to the server but did have access through a Plesk panel.

I found that I could in fact find some IIS config options per domain. One thing struck me. As I looked at the default documents set to serve for this domain…. all files were capitalized…. and I knew that my index.php files were lowercase. I wasn’t sure that this could be it or not… but figured what the heck. It was something that I had to add as I had noticed the index.php file was not loading by default.

Once I changed this setting to server index.php by default instead of Index.php…. the error went away.

It kinda surprised me that the error just went away. But I’m assuming that somewhere Kohana was calling a default file.

[ad code=6 align=center]