Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Catalyst issue

by rijuroyson (Initiate)
on Jan 06, 2012 at 09:15 UTC ( #946559=perlquestion: print w/ replies, xml ) Need Help??
rijuroyson has asked for the wisdom of the Perl Monks concerning the following question:


I have a webpage application that is developed in catalyst framework. This application is used to generate different reports from database. We were using mod_perl with apache for this application. Now we want to migrate from mod_perl to fastcgid. While doing the same, am stuck with an issue.

The application uses $c->uri_for call to get the absolute http path. It was working fine with mod_perl environment. But in fastcgid, the same call is not returning any value.

Did anyone faced such an issue ? Any pointers for this issue will be very helpful for me.


Comment on Catalyst issue
Replies are listed 'Best First'.
Re: Catalyst issue
by Khen1950fx (Canon) on Jan 06, 2012 at 10:21 UTC
    The first thing that you want to do is to check if you're running under FCGI or CGI. A simple way to check:
    #!/usr/bin/perl use strict; use warnings; use FCGI; my %env; my $req = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%env ); if( $req->IsFastCGI ) { print "This is FastCGI\n\n"; } else { print "This is CGI\n\n"; } print_env( "Request Environment", \%env ); $req->Flush(); sleep 3; print_env( "Initial Environment", \%ENV ); $req->Finish(); sub print_env { my($label, $envp) = @_; print("$label:<br>\n<pre>\n"); my @keys = sort keys(%$envp); foreach my $key (@keys) { print("$key=$$envp{$key}\n"); } print("</pre><p>\n"); }
      It is FCGI.
Re: Catalyst issue
by Anonymous Monk on Jan 07, 2012 at 01:13 UTC

    Did anyone faced such an issue ? Any pointers for this issue will be very helpful for me.

    Which version of which modules are you using?

      I am using Catalyst 5.7
      Perl 5.8.8
      Apache 2.2

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://946559]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2015-10-05 00:55 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (106 votes), past polls