[Catalyst] Canot get application working on IIS7 via FastCGI

Lyle webmaster at cosmicperl.com
Tue Oct 23 11:04:45 GMT 2012

On 23/10/2012 11:37, Craig Chant wrote:
> Bingo - You are a genius Tom!
> Thank you so, so much, I would never have found that switch buried in the documentation for a long, long time!

As this is standard behaviour for IIS, Catalyst really should be setting 
this by default when it's running under IIS. I didn't realise Catalyst 
had missed this, otherwise I probably could have answered the op's 
question from the start.

if ( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) {

IIS also doesn't have the pwd as the folder where the script is running. 
So you usually need to do:

use FindBin qw ($RealBin $RealScript);
use lib $FindBin::RealBin;
chdir $RealBin;

Otherwise you get issues when people try to open files with a relative path.


More information about the Catalyst mailing list