[ back to toc ]

CGI/PERL beginner using Tripod

Date: 2002/02/25 13:57

Q:
Alright, I'm trying to get a "simple" search to run on my church's website
that I built. My problem is, I don't know CGI at all. I got the freeware
script from BigNoseBird.com, it is: Selena Sol's search engine script. I'm
trying to run it out of tripod, I've got it in the cgi-bin directory, but
I keep getting an error of:
"Your script produced this error: (Maybe you didn't strip carriage returns
after a network transfer?)"
I don't have any clue what this means or how to fix it. I hope you do! I
appreciate your time on this issue that you'll probably know the answer to
and even chuckle that I'm so stupid.
If you'd like to see the script in action it is at:
http://affcma.tripod.com/index2.html (www.abundantfaithfamilychurch.com)

Thank you,
nick
A:
The error means that the lines in the script are terminated with two
characters: a carrige return (code=13) and a new line character (code=10).

Text files on Windows NT are composed of lines terminated with carriage
return and new line. Text files on UNIX are composed of lines terminated
with a single new line character. This is a big difference, which came
from historical reasons and can really cause a lot of problem not only for
the novice users.

When you upload a file from DOS, Windows to a UNIX machine you have to
take care of the file type. If the file type is binary, for exampel some
machine code then no conversion has to take place. If the file is text
then the line endings have to be converted. The ftp program, or the
operating system does not know if a program is text or binary. Any file
can principly be text or binary. This is just a matter of handling. The
ftp upload client programs however can make a good guess based on the
extension of the file. They assume that files with the extension .txt are
text files. Which is really a good guess. They may however erroneously
think that a file ending in .pl or .cgi is a binary file.

You should try to set the file type to text and upload the program again.

Regards,
Peter

[ back to toc ]