Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Forms Time out
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



Report this thread to moderator Post Follow-up to this message
Old Post
Simon Craig
03-19-04 06:26 PM


Re: Forms Time out
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

Report this thread to moderator Post Follow-up to this message
Old Post
Vorxion
03-19-04 06:26 PM


Re: Forms Time out
..

"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 
NT. 
servers 
>
> 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
:-( ;-)



Report this thread to moderator Post Follow-up to this message
Old Post
Simon Craig
03-19-04 06:26 PM


Re: Forms Time out
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

Report this thread to moderator Post Follow-up to this message
Old Post
Vorxion
03-19-04 06:26 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Freelance archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:31 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.