Solved

No data found in document -error dialog

Posted on 1998-03-24
5
152 Views
Last Modified: 2013-12-25
I have built many web-form sites which are processed by
CGI programs in perl on UNIX servers.  Occasionally a user
reports getting the error dialog "No data found in document"
or just "No data found" when clicking on the Submit button.

Can anyone tell me what causes this?  It only occurs occasionally and only to certain people.  Is there a client
environment issue which usually causes this?  I have also
experienced this myself occasionally when filling out web forms.
0
Comment
Question by:manningc
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 50 total points
ID: 1832202
Maybe "Document contains no data"?

That happens when your script dies (or just exits) after the header stuff has been sent (i.e. "Content-Type..."), but, after that, no actual data goes back to the client.

E.g., say your script does something like this:

1. output header stuff ("Content-Type: text/html\n\n");
2. open a file;
3. process the file;
4. send to the client data extracted from the file.

If your program silently dies when trying to open, or process, the file, the connection to the client is just dropped, no actual data ever goes back to the client, and the client browser shows that Information message.

To sum it up, you should check your scripts for weaknesses, like poor error handling.

HTH.
0
 

Author Comment

by:manningc
ID: 1832203
I tested out your answer with a test script on my server and
this does happen, so I accept your answer.  However, my production scripts have no "silent dies" and contain very strict error handling.  The form being processed is pretty complex
so all I can figure is that there must be some weird data
condition users hit occasionally that I can't reproduce in
testing.

Thanks....
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1832204
You could have asked more before giving a D grade.

This apart, i claim to be some sort of CGI expert, at least because i've written CGI scripts since the CGI protocol was invented, and have had occasions to face all kinds of problems, on lots of different OS/WebServer combinations; "Document contains no data" means what i've said and it is not my fault if you don't know how to debug your environment.

Just a hint: make your script output debug information to a log file (at least until you find the problem); _be_sure_output_to_the_log_is_unbuffered_.
You could make it print stuff like "Opening a certain file", "Reading data", "Parsing data..." "done.", and so on, as you see need.

Good luck.
0
 

Author Comment

by:manningc
ID: 1832205
The grading form has no "letter grades" on it.  Just words,
like "excellent"...etc.  I checked "Acceptable".  It doesn't say
anything about a "D". There's no need to be so sensitive; nobody forced you to answer the question. There's no need to condescend; just because I didn't know this particular thing doesn't mean I'm an idiot.

You got the points, didn't you?  
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1832206
Hmmm, that must be a new feature; there used to be "A" to "E" grades.

I don't think you are an idiot, but giving a D grade is not considered very kind unless you have gotten an idiot answer (that's why i got so sensitive); anyway, i've just read your profile and seen you are new to this forum... have fun! :)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question