You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Steven Zhu <St...@springbow.com> on 2000/06/20 19:19:56 UTC

document contained no data

Hi, All:

We have a coffee site with apache_1.3.9, modperl_1.2.1 and mysql
database.
It works fine in most time. But sometimes it is strange. For instance,
the same
script works fine sometimes, but sometimes it popups a window with
message
"The document contained no data Try again later, or contact the server's
administrator". It seems that the print statement does not work fine.
Any idea.
Thank in advance for your quick reply.

Steven.


Re: document contained no data

Posted by Steven Zhu <St...@springbow.com>.
I posted the message again because it didn't work when i put
$| = 1; or $r->rflush() at top or around print statement as some
people suggested. It is very confused. it should work without
putting those things. The thing affects performance. What i need
to do, your any answers would be very much appreciated.

Steven

Steven Zhu wrote:

> Hi, All:
>
> We have a coffee site with apache_1.3.9, modperl_1.2.1 and mysql
> database.
> It works fine in most time. But sometimes it is strange. For instance,
> the same
> script works fine sometimes, but sometimes it popups a window with
> message
> "The document contained no data Try again later, or contact the server's
> administrator". It seems that the print statement does not work fine.
> Any idea.
> Thank in advance for your quick reply.
>
> Steven.


Re: document contained no data

Posted by Steven Zhu <St...@springbow.com>.
This script should do sql things. After processing sql thing, it shoulld print
some output. Now sql thing is correct because i can see that the data was
in database, but output got this message. So i don't think that DB connection
is timing out. Thanks for your reply

"Erich L. Markert" wrote:

> One other thing... Make sure your DB connections are timing out.
>
> Blue wrote:
> >
> > On Wed, 21 Jun 2000, darren chamberlain wrote:
> >
> > > The problem seems to arise when your handler returns something (a status
> > > code) but hasn't send any data. Turning off buffering ($|) will only help
> > > if you actually send something. Try telnetting to port 80 on the web server
> > > and issue some HTTP commands directly, and see what the response is; that
> > > might give you some insight.
> > >
> > > I am always careful to not call die or return until I have sent the header,
> > > since that can cause the situation you are seeing.
> >
> > ah, good call, darren. the other reason i've seen this happen is plain ol'
> > failure of the script to execute, for whatever reason. tailing the error
> > log or running the script manually is a good way to check for that.
> >
> > when this question first came up, i checked all the FAQS i could find to
> > see if there was somewhere i could point the poster. does anyone know of a
> > comprehensive addressing of perl/mod_perl cgi errors on the net?
> >
> > danke,
> >
> > --
> >         Blue Lang                              Unix Systems Admin
> >         QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604
> >         Home: 919 835 1540  Work: 919 875 6994  Fax: 919 872 4015
>
> --
> __________________________________________________________
> Mr. Erich L. Markert                     emarkert@pace.edu
> Computer Learning Center                 TEL (914)422-4328
> Pace University
> 1 Martine Ave
> White Plains, New York 10606-1932
>
> Those who do not understand Unix are condemned to reinvent it, poorly.
>                 -- Henry Spencer


Re: document contained no data

Posted by "Erich L. Markert" <em...@pace.edu>.
One other thing... Make sure your DB connections are timing out.

Blue wrote:
> 
> On Wed, 21 Jun 2000, darren chamberlain wrote:
> 
> > The problem seems to arise when your handler returns something (a status
> > code) but hasn't send any data. Turning off buffering ($|) will only help
> > if you actually send something. Try telnetting to port 80 on the web server
> > and issue some HTTP commands directly, and see what the response is; that
> > might give you some insight.
> >
> > I am always careful to not call die or return until I have sent the header,
> > since that can cause the situation you are seeing.
> 
> ah, good call, darren. the other reason i've seen this happen is plain ol'
> failure of the script to execute, for whatever reason. tailing the error
> log or running the script manually is a good way to check for that.
> 
> when this question first came up, i checked all the FAQS i could find to
> see if there was somewhere i could point the poster. does anyone know of a
> comprehensive addressing of perl/mod_perl cgi errors on the net?
> 
> danke,
> 
> --
>         Blue Lang                              Unix Systems Admin
>         QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604
>         Home: 919 835 1540  Work: 919 875 6994  Fax: 919 872 4015

--
__________________________________________________________
Mr. Erich L. Markert                     emarkert@pace.edu
Computer Learning Center		 TEL (914)422-4328
Pace University
1 Martine Ave
White Plains, New York 10606-1932

Those who do not understand Unix are condemned to reinvent it, poorly.
                -- Henry Spencer

Re: document contained no data

Posted by Blue <bl...@calico.gator.net>.
On Wed, 21 Jun 2000, darren chamberlain wrote:

> The problem seems to arise when your handler returns something (a status
> code) but hasn't send any data. Turning off buffering ($|) will only help
> if you actually send something. Try telnetting to port 80 on the web server
> and issue some HTTP commands directly, and see what the response is; that
> might give you some insight.
> 
> I am always careful to not call die or return until I have sent the header,
> since that can cause the situation you are seeing.

ah, good call, darren. the other reason i've seen this happen is plain ol'
failure of the script to execute, for whatever reason. tailing the error
log or running the script manually is a good way to check for that.

when this question first came up, i checked all the FAQS i could find to
see if there was somewhere i could point the poster. does anyone know of a
comprehensive addressing of perl/mod_perl cgi errors on the net?

danke,

-- 
        Blue Lang                              Unix Systems Admin
        QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604
        Home: 919 835 1540  Work: 919 875 6994  Fax: 919 872 4015



Re: document contained no data

Posted by darren chamberlain <da...@boston.com>.
Steven Zhu (Steven.Zhu@springbow.com) said something to this effect:
> Hi, All:
> 
> We have a coffee site with apache_1.3.9, modperl_1.2.1 and mysql database.
> It works fine in most time. But sometimes it is strange. For instance, the same
> script works fine sometimes, but sometimes it popups a window with message
> "The document contained no data Try again later, or contact the server's
> administrator". It seems that the print statement does not work fine.
> Any idea.
> Thank in advance for your quick reply.
> 
> Steven.

This probably won't help, but I was getting the same dialog box when
accessing directories, but that was using HTML::Mason.

The problem seems to arise when your handler returns something (a status
code) but hasn't send any data. Turning off buffering ($|) will only help
if you actually send something. Try telnetting to port 80 on the web server
and issue some HTTP commands directly, and see what the response is; that
might give you some insight.

I am always careful to not call die or return until I have sent the header,
since that can cause the situation you are seeing.

darren

-- 
If only God would give me some clear sign! Like making a large
deposit in my name in a Swiss bank.
-- Woody Allen

Re: document contained no data

Posted by Blue <bl...@calico.gator.net>.
On Tue, 20 Jun 2000, Steven Zhu wrote:

> Hi, All:

> We have a coffee site with apache_1.3.9, modperl_1.2.1 and mysql
> database.

upgrade that suff. :)

> "The document contained no data Try again later, or contact the server's
> administrator". It seems that the print statement does not work fine.
> Any idea.

look around for info on what happens when CGI output gets buffered. try
adding



     $| = 1;

in there somewhere. :)

Good luck,

-- 
        Blue Lang                              Unix Systems Admin
        QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604
        Home: 919 835 1540  Work: 919 875 6994  Fax: 919 872 4015