|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39766 PHP wastes time on a slow network connection instead of recieving the buffers
Submitted: 2006-12-07 15:34 UTC Modified: 2006-12-16 01:00 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: deepak dot vasudevan at lavanyadeepak dot tk Assigned:
Status: No Feedback Package: CGI/CLI related
PHP Version: 4.4.4 OS: Windows 2003/IIS 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
49 - 16 = ?
Subscribe to this entry?

 [2006-12-07 15:34 UTC] deepak dot vasudevan at lavanyadeepak dot tk
I have configured PHP with IIS 6.0 in CGI flavor. I have also optimized the following values in PHP.INI to facilitate huge uploads to the tune of 200 MB:

(*) Memory Limit
(*) Max Input Time
(*) Max Script Time

The file upload passes fine if the client browser is connected to the web server in a high speed network. It works like a charm since it does not spike the CPU too. However, when I move the webserver to a different network and the access the server, because of network delays, even though Network Packet Analyzers show incoming data to the webserver running PHP, PHP does not do anything after 70% of the filesize. 

It sits silently and then after Max Input Time/Max script Time, gets recycled by IIS with the error message "CGI Misbehaved".  All other settings are identical.

Expected result:
PHP should behave identically in all environments. Slow network and CGI flavor seems to disturb the buffering strategy.

Actual result:
The php process gets killed by IIS with CGI Error "CGI application misbehaved ...".


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-07 19:57 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2006-12-08 14:01 UTC] deepak dot vasudevan at inbox dot com
I would like to know how to configure and ensure that PHP keeps buffering the data as it comes instead of waiting for the full file to come into the server.

This would avoid CGI Timeout.
 [2006-12-08 14:07 UTC]
PHP does not know if it is in the same network relative to the client or not. And it doesn't depend on this in any way.
So please make sure there are no firewalls between you and the web-server, try another browser, make sure PHP actually receives all the data during max_input_time etc. etc.
I'm definitely unable to reproduce anything like that.
 [2006-12-16 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 14:01:28 2023 UTC