Problem getting cgi script to work with apache?

Gordon Messmer yinyang at eburg.com
Tue Jun 20 18:22:35 UTC 2006


Knute Johnson wrote:
> 
> No it was almost twice as many lines.  But I think that is where the 
> problem is.  Another fellow suggested that I try dos2unix and that 
> makes a file exactly the same size as the VIM copied one that works.  
> I just tried it and that has fixed my problem.  I had no clue that 
> perl was sensitive to carriage returns.

As far as I know, it's not.  The problem you run in to is that the 
kernel *is* sensitive to CR in the shebang.  If the first line of your 
file is:

#!/usr/bin/perl\r\n

...then the kernel will try to exec "/usr/bin/perl\r", which doesn't 
exist.  Naturally, as a kernel issue, this affects all scripts, 
regardless of the interpreter used.




More information about the fedora-list mailing list