Solved

No data found in document -error dialog

Posted on 1998-03-24
5
150 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now