Archive for the ‘rails’ Category

Rails Error: Malformed header from script

August 6, 2008

If you are running your rails app on an Apache2+ mod_fcgid set up and you receive errors like

[Fri Aug 1 08:10:06 2008 [error] [client 111.222.333.444] malformed header from script. Bad header=*******: dispatch.fcgi

in the Apache error log, make sure you don’t have any output to console (like ‘puts’, added for debugging) left in the code.

Whatever the script output goes to the header section of the response and most of the times Apache won’t understand it.

Removing “puts” from the code helped me fix it.

Advertisements