public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Garrett <peterg@fishinternet.com.au>
To: linux-newbie list <linux-newbie@vger.kernel.org>
Subject: Re: error: premature end of script headers in cgi
Date: Wed, 01 Sep 2004 07:04:02 +1000	[thread overview]
Message-ID: <1093986242.15255.10.camel@DebiAnarchist> (raw)
In-Reply-To: <fc.004c4e000061b03e004c4e000061b03e.61b099@palmertrinity.org>

On Wed, 2004-09-01 at 00:47, William Stanard wrote:

> 
> [error] [client 10.0.4.126] Premature end of script headers: gm.cgi
> 
> I am guessing that in moving the cgi scripts to my Linux box via
> Dreamweaver, I "added" some bogus carriage returns or some such... How can
> I (first) see if that is what I did and (two) edit same...

Bill: I'm no expert, and perhaps someone more knowledgeable might be
able to explain better, but I believe your guess may be correct. The
carriage returns for DOS/Windows are different from those in UNIX (which
Linux more closely resembles, of course.) 

The program you want is probably the command-line utility dos2unix.
Seems to be pretty standard on most Linux installations. From "man
dos2unix":

" tofrodos - Converts text files between DOS and Unix formats.

SYNOPSIS
       fromdos [ options ] [file...]
       todos [ options ] [file...]

DESCRIPTION
       DOS  text  files traditionally have carriage return and line feed
pairs
       as their newline characters while Unix text files have the line
feed as
       their newline character.  fromdos converts text files from the
DOS for-
       mat to the Unix format, while todos converts text files from 
the  Unix
       format to the DOS format. ...."


Hope this helps...

Peter

-- 
Windows belongs to Microsoft: Linux belongs to humanity

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2004-08-31 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 14:47 error: premature end of script headers in cgi William Stanard
2004-08-31 21:04 ` Peter Garrett [this message]
2004-08-31 22:02 ` John Kelly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1093986242.15255.10.camel@DebiAnarchist \
    --to=peterg@fishinternet.com.au \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox