> A very long time ago I was having trouble getting rails and FastCGI to
play nice on Windows. Recently this has cropped up again.
> I''m running WinXP, Apache 2.x and rails 0.11.1. I''ve done
the following:
> Create a new rails app
> Modify .htaccess to use dispatch.fcgi
> Make sure that my apache httpd.conf has:
> LoadModule fastcgi_module modules/mod_fastcgi.so
> <IfModule mod_fastcgi.c>
> AddHandler fastcgi-script .fcgi
> </IfModule>
> Generated a scaffold for a user model and users controller (and yes the DB
has a user table)
> Tried http://localhost/users
> I keep getting 500 errors, and when I check the apache.log file I always
see two lines saying the pipe has ended for the fcgi process > and that
GetOverlappedResult() fails.
> I had been running FastCGI fine for a long time on my real app, and
suddenly it stopped working, presumably after upgrading my rails > app a
number of times. So I tried this litmus test to see if I could get a fresh
install to work, but both exhibit the same behavior.
> I also tried a simple fcgi test script that loads fcgi and just spits out
some html. That works. I tried editing the dispatch.fcgi to > so the same
instead of its normal operations. That works. When I add back the require
statements (dispatcher and environment) it
> throws the 500 again.
If anyone else has seen this error, I have narrowed it down. The oci8 (oracle)
adapter is the culprit. If I use Apache 1.3 and FastCGI I get an error dialog
telling me what went wrong. The oci8 library is choking looking for an OCI.DLL.
If you comment out the require statement in activerecord.rb that loads the
oracle adapter, it fixes the problem. Of course, if you actually use the adapter
then you you''ll need a fix to the library. I''ve filed bugs
with both rails and the oci8 library to hopefully look into this issue.
Thanks,
Chris