Solved

No data found in document -error dialog

Posted on 1998-03-24
5
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How our DevOps Teams Maximize Uptime

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

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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