in reply to Not getting CGI parameters under FastCGI

I can confirm that behaviour. Particularly weird is that if you print out $ENV{QUERY_STRING}, you can actually see the current proper values being passed in via the URL (GET request) — the param() method, however, continues to return the first-time value unchanged. It apparently doesn't reparse the available new input.  It doesn't even help to explicitly call $q->delete("name") or $q->delete_all() at the end of the request cycle...

Well, for the moment, I don't have a solution other than to suggest that you use CGI::Simple instead, which doesn't suffer from this problem (it's a CGI drop-in replacement for most things you typically need, i.e. you'd just do my $q = new CGI::Simple; and then call $q->param(...) etc. as usual).

Replies are listed 'Best First'.
Re^2: Not getting CGI parameters under FastCGI
by bakerjay (Initiate) on May 25, 2008 at 03:23 UTC
    Hey, thanks - good to know I'm not just going crazy!
    Tried CGI::Simple, and as you say, it works fine. The application I'm trying to use this with uses CGI::Application, so might have to see if I can change that module to use CGI::Simple for now too...hmmm...I'll see how I go.
    Cheers
    Jay
      Actually, turns out my CGI::Application was something entirely different...in trying to reduce it to a test case, I found a new problem! Grr..

      Anyway...main problem was that under CGI::Application::FastCGI, I was not releasing the database connection (was no need under normal CGI, it just released itself...), so then trying to recreate it failed miserably.

      So...thanks for your help, think I'm all sorted now.
      Jay