[Catalyst] apache, mod_fcgi & local::lib

Tomas Doran bobtfish at bobtfish.net
Wed Mar 14 10:11:25 GMT 2012

On 13 Mar 2012, at 16:22, cylontoaster wrote:

> Hello,
> I got stuck in deploying my first Catalyst-application on a SuSE-platform:-(
> I've mod_fcgi (not fast_cgi),  FCGI.pm and I also use local::lib.


>        Order allow,deny
>        Allow from all
>        AddHandler fcgid-script .pl

If you change this to fcgid-script .fcgi

> </Location>
> </VirtualHost>
> That my apache is able to find the local_lib I declared in '/etc/apache2/conf.d/mod_fcgid.conf'  the DefaultInitEnv variable:
> DefaultInitEnv PERL5LIB /root/perl5/lib/perl5/

And skip this.

> That's it ... after restarting the apache I get an error :
> Can't locate Catalyst/ScriptRunner.pm in @INC (@INC contains: /root/perl5/lib/perl5/ /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at /srv/www/web/DW/script/dw_fastcgi.pl line 3.
> BEGIN failed--compilation aborted at /srv/www/web/DW/script/dw_fastcgi.pl line 3.
> ... but I can clearly see that ScriptRunner exists in the local::lib-directory:

And write a myapp.fcgi, like this:

eval $(perl -I/home/foo/perl5/lib/perl5 -Mlocal::lib=/home/foo/perl5)
exec /home/foo/MyApp/script/myapp_fastcgi.pl $*

> -r--r--r-- 1 root root 1542 2011-02-16 22:28 /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm
> Anyone has an idea? Is this a bug?

I think the DefaultInitEnv isn't working as expected somehow. I'd just work around this (as above) with a shell script.

> Thanx for every hint to get Catalyst running ;-)

Hope this helps.

Please drop into IRC if you're still stuck?


More information about the Catalyst mailing list