Home > Archive > PERL CGI Freelance > March 2004 > Forms Time out
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Simon Craig 2004-03-19, 1:26 pm |
| Right then, I was wondering if someone could help
I am sending a form to a Perl prog. The problem is in the Perl reading it
I get
----------------------------
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The
server has deleted the process.
---------------------------
I have tracked it down to the line.
read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
On my old server I did not have a problem. But it has changed to Windows NT.
and I have updated my browser from ie5.1 to ie6.
A search on the web has revealed there is a problem with STDIN on such a
setup. However I cannot find how to get around it. Surly Windows NT servers
are able to process forms.
Can anyone help?
Thanks
Simon
--
www.dinosaurtium.co.uk The dinosaur shop has moved to the North-East
| |
| Vorxion 2004-03-19, 1:26 pm |
| In article <c0d7gq$296$1@newsg2.svr.pol.co.uk>, Simon Craig wrote:
>Right then, I was wondering if someone could help
>
>I am sending a form to a Perl prog. The problem is in the Perl reading it
>I get
>----------------------------
>CGI Timeout
>The specified CGI application exceeded the allowed time for processing. The
>server has deleted the process.
>---------------------------
>I have tracked it down to the line.
> read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>
>On my old server I did not have a problem. But it has changed to Windows NT.
>and I have updated my browser from ie5.1 to ie6.
>
>A search on the web has revealed there is a problem with STDIN on such a
>setup. However I cannot find how to get around it. Surly Windows NT servers
>are able to process forms.
>
>Can anyone help?
I have no idea if this will actually work, but it can't hurt to try it.
It's the best shot I can come up with off the cuff.
$oldhandle = select(STDIN);
$|=1;
select(${oldhandle});
Try inserting that before any reads are done from STDIN.
--
Vorxion - Member of The Vortexa Elite
| |
| Simon Craig 2004-03-19, 1:26 pm |
| ..
"Vorxion" <vorxion@knockingshopofthemind.com> wrote in message
news:402a46c6$1_1@news.iglou.com...
> In article <c0d7gq$296$1@newsg2.svr.pol.co.uk>, Simon Craig wrote:
The[color=darkred]
NT.[color=darkred]
servers[color=darkred]
>
> I have no idea if this will actually work, but it can't hurt to try it.
> It's the best shot I can come up with off the cuff.
>
> $oldhandle = select(STDIN);
> $|=1;
> select(${oldhandle});
>
> Try inserting that before any reads are done from STDIN.
>
One answer to the same problem, I have found on a board is
-------------
I've seen IE sometimes not end a post with a CRLF pair. I don't know much
about the perl "read" function, but if it expects a end-of-line in text
mode, then that may be your problem. You might want to try putting STDIN in
binary mode, or perhaps sysread may work better (possibly also with binary
mode).
-------------
I understand their reason why they think it is not working. I will have to
look into their solution. Is that what yours does? It didn't work but, I
should find out what it did anyway.
Ta
Simon
p.s. I hate bottom posting but I will follow the precedent of the thread
:-( ;-)
| |
| Vorxion 2004-03-19, 1:26 pm |
| In article <c0g0r0$sh5$1@newsg3.svr.pol.co.uk>, Simon Craig wrote:
>
>One answer to the same problem, I have found on a board is
>-------------
>I've seen IE sometimes not end a post with a CRLF pair. I don't know much
>about the perl "read" function, but if it expects a end-of-line in text
>mode, then that may be your problem. You might want to try putting STDIN in
>binary mode, or perhaps sysread may work better (possibly also with binary
>mode).
>-------------
Funny, I've never seen that behaviour. Actually, that's only going to be
an issue if the POST was made in multipart/form-data encoding, rather than
with application/x-www-form-urlencoded. The latter relies soley on the
CONTENT_LENGTH environment variable from the server. Well, the former
-should- as well, as CONTENT_LENGTH is part of POST, nevermind which
encoding is used. If a CRLF was missing on a multipart/form-data
submission, however, it could indeed be sitting there waiting for the last
two bytes that it thinks -should- be there from the value of CONTENT_LENGTH.
Personally, it sounds like whatever program you have is a bit odd under
Windows. Actually, I deleted the quoting, but didn't you say it was
originally on *nix and is now on Windows? They might have something with
that. Try binmode() on the filehandle and see if it helps. That would
indeed make sense.
> I understand their reason why they think it is not working. I will have to
>look into their solution. Is that what yours does? It didn't work but, I
>should find out what it did anyway.
Mine turned autoflush on for the file descriptor, thinking it could have
just been a delay on the flush.
>p.s. I hate bottom posting but I will follow the precedent of the thread
>:-( ;-)
Thank you for your excellent nettiquette. :)
--
Vorxion - Member of The Vortexa Elite
|
|
|
|
|