Hi, I''m desperate, so I thought I''d try one more time in the hopes of getting a different audience. Basically. it boils down to this. Using CGI, the ENV hash is populated and is accessible from a model script. Using FastCGI, the ENV hash is empty. Can anyone explain how I can fix this? Thanks, Stan Mcfarland -- View this message in context: http://www.nabble.com/one-more-try---ENV-and-FastCGI-t1521255.html#a4131042 Sent from the RubyOnRails Users forum at Nabble.com.
On Apr 27, 2006, at 3:39 PM, sfmcfar wrote:> I''m desperate, so I thought I''d try one more time in the hopes of > getting a > different audience. Basically. it boils down to this. Using CGI, > the ENV > hash is populated and is accessible from a model script. Using > FastCGI, the > ENV hash is empty. Can anyone explain how I can fix this?Perhaps there''s no ENV when FastCGI is started? I haven''t done any ENV based configuration in Rails, though I used to be a big fan in mod_perl days. If you''re using Apache, then you specifically need to declare which environment vars to pass via the PassEnv configuration option. -- -- Tom Mornini
Well, FastCGI has a parameter called -initial-env which is suypposed to allow you set the environmental variables of interest, but I can''t seem to make it work. I might need to revisit, though. Thanks for the reminder. -stan -- View this message in context: http://www.nabble.com/one-more-try---ENV-and-FastCGI-t1521255.html#a4133210 Sent from the RubyOnRails Users forum at Nabble.com.
sfmcfar wrote:> Well, > > FastCGI has a parameter called -initial-env which is suypposed to allow > you > set the environmental variables of interest, but I can''t seem to make it > work. I might need to revisit, though. Thanks for the reminder. > > -stan > -- > View this message in context: > http://www.nabble.com/one-more-try---ENV-and-FastCGI-t1521255.html#a4133210 > Sent from the RubyOnRails Users forum at Nabble.com.Here''s an entry from a running apache config file setting up my fastcgi (if it helps?) FastCgiServer "C:/WebApps/_premier/public/dispatch.fcgi" -idle-timeout 120 -processes 2 \ -initial-env PATH="C:/PROGR~1/ruby/bin;C:/PROGR~1/MYSQL/MySQLS~1.0/bin;c:/windows/system32;c:/windows;" \ -initial-env RUBYOPT=rubygems \ -initial-env RAILS_ENV=development -- Posted via http://www.ruby-forum.com/.
And the ENV hash contains the variables you''ve set with initial-env? I can get at these variables through the request.env object, but I need to access them in a model script, and the request object isn''t available to the model. Thanks, -stan -- View this message in context: http://www.nabble.com/one-more-try---ENV-and-FastCGI-t1521255.html#a4141220 Sent from the RubyOnRails Users forum at Nabble.com.
And the ENV hash contains the variables you''ve set with initial-env? I can get at these variables through the request.env object, but I need to access them in a model script, and the request object isn''t available to the model. Thanks, -stan -- View this message in context: http://www.nabble.com/one-more-try---ENV-and-FastCGI-t1521255.html#a4141212 Sent from the RubyOnRails Users forum at Nabble.com.
Seemingly Similar Threads
- newbie question regarding basic AJAX form verification
- selftest: Perl error "Insecure $ENV{ENV} while running setgid at /home/user/src/samba-git/samba/source3/script/tests/printing/modprinter.pl line 138."
- test env. differs from development env, tests breaking
- Installing SJava (I'm almost there, just a little more help please!....please!)
- + camping 1.4.140 -- apache+fastcgi, lighttpd+fastcgi