in reply to Premature end of script

It's kind of difficult to answer this without seeing the code or, at least, some output. You say it "works fine" from the command line but what does that mean exactly?

The errors indicate that the headers aren't correct. Are you remembering to print a Content-type header? Are you properly ending your headers with a blank line?

Your output should probably look something like:

Content-type: text/html <html> . . . </html>

Of course, that's just a guess.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: Premature end of script
by Baz (Friar) on Aug 12, 2002 at 19:34 UTC
    I was creating a GD(.pm) object before my header() call. This never gave an error before, so perhaps a newer version of GD.pm was installed on the machine - a vesion which perhaps outputs an image header when creating the object..