[REBOL] Re: cgi weirdness
From: sanghabum:aol at: 4-Dec-2001 4:52
> Just yesterady I had similar problem. Even detab was not
> enough. I cut and pasted first line from another script
> (#!/usr/bin/rebolcmd -cs), detabbed the script, manually
> pressed enter at the end of the line, deleted empty
> lines, entered new ones, etc. - no success. I simply
> deleted line above
> and typed it from scratch manually - oops - script
> started to work. It already happened to me two times ....
I had a similar problem the first time I tried a CGI script. It drove me
bonkers and had me installing and reinstalling software until the "Ah-ha!"
My problem was related to CGI scripts and line termination.....There are
three ways to terminate a line (CR, LF and CRLF), Between them, MAC OS,
Unix/Linux, and WIN/DOS use all three.
Apache (for example) only likes one type of termination, regardless of the
OpSys it is running under, So
may look good, but Apache may be misreading the line endings and see it as
#!rebol/rebol.exe -Rebol 
Which won't work at all.
If you are on Windows, as far as I remember any text editor will produce line
endings that Apache will accept. You can, though demonstrate the problem by
saving an MS Word file as ASCII. Apache won't parse that properly.