Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Answer: How can I find a 'Document contains no data' problem?

by extremely (Priest)
on Oct 24, 2000 at 05:58 UTC ( #38063=categorized answer: print w/replies, xml ) Need Help??

Q&A > CGI programming > How can I find a 'Document contains no data' problem? - Answer contributed by extremely

Document contains no data is a pretty clear indicator that your program exited early. Like other have said, check your error logs, add the lovely use CGI::CARP qw(fatalsToBrowser); to hopefully get SOME data to the browser.

Also, if it's a basic perl script cgi try perl -cw filename.cgi and see if it complains about a simple error that might bomb it out.

I had this happen once with a 45kb script with scads of modules. I had -w and use strict; and CGI and Carp and all that jazz going, no errors in the log, no compile errors, nothin. After hours, literally, I noticed that I had absentmindedly put an exit(0); where a much more reasonable return(0); should have been. =) It happens...

  • Comment on Answer: How can I find a 'Document contains no data' problem?
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-09-20 03:17 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (117 votes). Check out past polls.