From owner-freebsd-questions Wed Oct 17 8:14:13 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp.umr.edu (mrelay.cc.umr.edu [131.151.1.89]) by hub.freebsd.org (Postfix) with ESMTP id 8F27537B405 for ; Wed, 17 Oct 2001 08:14:08 -0700 (PDT) Received: from umr-mail01.cc.umr.edu (umr-mail01.cc.umr.edu [131.151.1.108]) via ESMTP by mrelay.cc.umr.edu (8.9.3/R.4.20) id KAA20504; Wed, 17 Oct 2001 10:14:04 -0500 Received: by umr-mail01.cc.umr.edu with Internet Mail Service (5.5.2653.19) id ; Wed, 17 Oct 2001 10:14:04 -0500 Message-ID: <6CAC36C3427CEB45A4A6DF0FBDABA56D950977@umr-mail03.cc.umr.edu> From: "Thill, Daniel Gerard (UMR-Student)" To: "'freebsd-questions@freebsd.org'" Cc: "'cjcarri@earthlink.net'" Subject: RE: One CGI script won't run - permission problemss?? Date: Wed, 17 Oct 2001 10:14:04 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I checked /var/log/httpd-error.log, and found the > messages "No such file or > directory: exec of > /usr/local/www/cgi-bin/nutest1.pl failed" and "Premature > end of script headers usr/local/www/cgi-bin/nutest1.pl" I'm pretty sure it's the line-endings in the file. *NIX's store text files with a linefeed (LF) as the end of line marker. Windows uses a carriage return as well (CRLF). When you copy them over to *NIX, sometimes things will work, sometimes they won't. (If you see ^M's at the end of every line in your text editor, you know for sure that it was made under Windows). I know on solaris, I used "dos2unix" to convert file. I'm sure that FreeBSD has an equivalent, I just haven't had to use it yet :) You can also just write a quick perl script that does a "s/\r\n/\n/" on each line and rewrites the file. Run this from the your FreeBSD machine. The Win32 port of Perl (well, at least Activestate's) write "\n" as CRLF instead of LF. Also, make sure that there is at least one blank line after the shebang line, ie: --------------------top of file #!/path/to/perl #first line of perl code # etc ------------------------------- Let me know if you need any help with the perl code... -dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message