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
Solved

No data found in document -error dialog

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
inactive users 13 81
Powershell Script need assistance to make some changes 4 91
Creating 2 files from output with Powershell 5 53
Need help Creating PowerShell Script 5 52
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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 …

792 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