ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: Using Derrick Pallas' ruby fcgi dispatcher
by Kai Krakow other posts by this author
May 13 2008 6:50AM messages near this date
Re: Using Derrick Pallas' ruby fcgi dispatcher | Re: Using Derrick Pallas' ruby fcgi dispatcher
Hallo!

Thank you for the suggestions.

On 9 Mai, 18:34, Martin Boese <boese...@[...].de>  wrote:
>  No clue, but I suggest you to add some:
> 
>  > $stderr.puts "TEST X: #{cgi.params.inspect}"
> 
>  ...all over that dispatcher script to see where the problem starts (it will
>  log to lighttpd's error log).

It starts right in the first line of the FCGI.each_cgi loop:

54 FCGI.each_cgi do |cgi|
55   $stderr.puts "TEST1: #{cgi.params.inspect}"

On first request the parameters are correct. On subsequent requests
the hash is just plain empty:

2008-05-13 15:30:23: (mod_fastcgi.c.2592) FastCGI-stderr: TEST1:
{"time"=> ["jetzt"], ..., "keyword"=>["bla"]}
2008-05-13 15:30:44: (mod_fastcgi.c.2592) FastCGI-stderr: TEST1: {}

>   I also had many problems with fcgi and lighttpd mainly because it was setting
>  different environment variables than other webserver (webrick). To fix this I
>  first modify the environment table before I continue and so far I have no
>  problems:

>  class CGI [...]

I've put that class into my dispatcher in front of the loop and
patched the loop to call fix_env(). Provided this was correct how I've
done it, it doesn't fix my problem.

It's also not dependent on the webbrowser or different vs. same params
on subsequent request. The second and further requests just have an
empty parameter hash. A lighttpd restart is required to get it working
for one time again.

Regards,
Kai
Thread:
Kai Krakow
Martin Boese
Kai Krakow
Kai Krakow

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved