You show us that you return a valid header, thus no 500 internal server error. This "document contained no data" message appears when the script does not return any information to the browser. Often it happens when the script tries to access a nonexistent file and then return information from that file or the script takes so long to run that the browser times out. Add these lines as shown: <code> $|++; print "Content-type: text/html\n\n" # <- existing line print "

Hello World!\n" <code>

The $|++ forces buffer flushing and then after your header you print a short message :-) If this works but you get nothing else then, ahm, well, the document contained no data - because your script doesn't send any.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Very lame question -- what can i say? I'm a newbie by tachyon
in thread My CGI gives "document contained no data" by mrampton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.