[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Want to watch the fun with the Code Red and it's new variant?



>On Thu, 9 Aug 2001 12:29:14 -0700, Jim Scott mumbled something like:
>>>When I used it with a CGI extension it did not work. I just removed
>>>the CGI
>>>extension from the name and called it again from the CGI directory
>>>and it
>>>worked.
>
>That's because it's not a CGI script, it's a shell script - running
>it through the cgi wrapper was causing the error.
>Sorry I didn't see this one earlier or would've suggested taking the
>extention off, still replying though because I thought you might like
>to know *why* taking the name off made it work.



Carrie,

it doesn't really matter what kind of script it is - sh, bash, ksh, perl, WHATEVER - that's the WHOLE PURPOSE of the very first line of script, which in this case is:

#!/bin/sh

This line is interpreted by the shell and tells it what binary to use when interpreting the script - if you don't have the VERY FIRST LINE as this comment - *WITH* the exclamation point *AND* the full path to the binary, then the script will fail to run.

If you input the script EXACTLY as I published it, there should be ZERO  problems running it under CGI-WRAPPER or WITHOUT CGI-WRAPPER - it really doesn't matter.

Might I recommend a good book on Unix?

regards

Greg Hewitt-Long
-- 
http://www.webyourbusiness.com/
Providers of E-Commerce Software &
Web Design Consultancy and Services.
PH: (970)266-0195 FAX: (970)266-0158