Problems with fcgi/ruby - "incomplete headers"


T

Tiago Cruz

Hello guys,

I'm newbie on ruby world, and I hope understood this program soon ;)

The error on log is "FastCGI: incomplete headers (0 bytes) received from
server" and all the places that I read says this like one problem with
fcgi, so I'm trying to reinstall it.

=========================================================================================
# gem uninstall fcgi
Successfully uninstalled fcgi version 0.8.7


# gem install fcgi
Need to update 18 gems from http://gems.rubyforge.org
..................
complete
Building native extensions. This could take a while...
ruby extconf.rb install fcgi
checking for fcgiapp.h... yes
checking for FCGX_Accept() in -lfcgi... yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -DHAVE_FCGIAPP_H -fPIC -g -O2 -fPIC -c fcgi.c
gcc -shared -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o fcgi.so fcgi.o -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -L. -lruby -lfcgi -ldl -lcrypt -lm -lc

make install
/usr/bin/install -c -m 0755 fcgi.so /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib

make clean
Successfully installed fcgi-0.8.7
=========================================================================================

But not works. When I try compile to my self, don't works because the
directory is not the same, and the application can't "see" the module:


=========================================================================================
sites-12:/src/ruby/ruby-fcgi-0.8.7 # ruby install.rb setup
---> lib
<--- lib
---> ext
---> ext/fcgi
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I/iG/src/ruby/ruby-fcgi-0.8.7/ext/fcgi -DHAVE_FCGIAPP_H -fPIC -g -O2 -fPIC -c fcgi.c
gcc -shared -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o fcgi.so fcgi.o -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -L. -lruby -lfcgi -ldl -lcrypt -lm -lc
<--- ext/fcgi
<--- ext
sites-13:/iG/src/ruby/ruby-fcgi-0.8.7 # ruby install.rb install
rm -f InstalledFiles
---> lib
mkdir -p /usr/local/lib/ruby/site_ruby/1.8
install fcgi.rb /usr/local/lib/ruby/site_ruby/1.8/
<--- lib
---> ext
---> ext/fcgi
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux
install fcgi.so /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/.
<--- ext/fcgi
<--- ext
=========================================================================================

Can you see?
Using gem.: /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib
Using ruby: /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/

Well... I tried to make symlink and/or copy the .so file, but don't
works yet.

I'm using SuSE Enterprise Server 9 x86_64, with all compiled:
mod_fastcgi-2.4.2.tar.gz / mod_ruby-1.2.6.tar.gz
ruby-1.8.5.tar.gz / ruby-fcgi-0.8.7.tar.gz
fcgi-2.4.0.tar.gz / mod_fcgid.1.10.tar.gz

On apache, I'm tried the fastcgi_module and the fcgid_module, but I
can't do applications works with any one :-(

Thanks a lot!
Happy new year for all!
 
Ad

Advertisements

D

David Vallner

--------------enigEF984E4A6D75F9C7BB747EF4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Tiago said:
Hello guys,
=20
I'm newbie on ruby world, and I hope understood this program soon ;)
=20
The error on log is "FastCGI: incomplete headers (0 bytes) received fro= m
server" and all the places that I read says this like one problem with
fcgi, so I'm trying to reinstall it.
=20

Hmm. Are you sure this is a problem with FCGI itself? The error looks
similar to the dreaded regular CGI "premature end of script headers",
which is usually a problem in your application code.

David Vallner


--------------enigEF984E4A6D75F9C7BB747EF4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFk9v+y6MhrS8astoRAjDIAJ4w8S3W3ocHHH2Qvo3z9Z5DsVCB4QCfcA43
gP5az0p4QJrGu2f/r02zXJY=
=PphT
-----END PGP SIGNATURE-----

--------------enigEF984E4A6D75F9C7BB747EF4--
 
Ad

Advertisements

T

Tiago Cruz

Hello David,

Hmm. Are you sure this is a problem with FCGI itself? The error looks
similar to the dreaded regular CGI "premature end of script headers",
which is usually a problem in your application code.

Really. But this application was working hosted on dreamhost now... and
I'm getting to work here now. So, I think that the problem is another...

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top