ID:               27007
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bty at requesttech dot com
-Status:           Open
+Status:           Closed
 Bug Type:         PostgreSQL related
 Operating System: RedHat 9
 PHP Version:      4.3.4
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-01-28 21:38:34] bty at requesttech dot com

What I am saying is that PHP is NOT calling client subroutine to close
the socket when the database connection fails.  I believe that
programmers thought that cleanup would be automatic on a failed login,
but it is not the case.

We have telephony applications based on the same postgreSQL libraries
that do not have this problem.

------------------------------------------------------------------------

[2004-01-28 21:28:39] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The 'real' problem is in client libraries that actually 
open & close sockets. PHP only calls the client library 
that is the one to perform the various low level socket 
operations. Assuming what you say is true, the bug lies 
with the client library and not PHP. 

------------------------------------------------------------------------

[2004-01-28 21:23:33] bty at requesttech dot com

The same behavior occurs in any situation where a FIN packet is
initiated by the server.  MySQL, Oracle etc... 

I do not need help using PHP I have been using since early V3 days and
have been a Linux developer for over 8 years now.  The only problem is
PHP developers inability (laziness) to address real problems.  Please
leave this bug report open until I have had a chance to fix the code
myself.  You may want to recategorize as this is a more general flaw in
PHP as it shows up in other socket related functions.

------------------------------------------------------------------------

[2004-01-28 20:32:04] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP does not actually open the socket, this is done by the 
PostgreSQL library functions PQconnectdb() or PQsetdb(). If 
the socket is left in CLOSE_WAIT, then you either got a buy 
PostgreSQL library or found a bug in PostgreSQL. 

------------------------------------------------------------------------

[2004-01-28 08:35:19] bty at requesttech dot com

The code is only an example of what will cause the problem.  The fact
that it is "insane" to do this does not eleminate the problem.  Picture
hundreds of people failling to login to a high traffic web site.  I
will have to HUP the server every couple of hours to fix PHPs problem.

Did you even bother to try the code?  I have tcpdumps proving that PHP
is doing the WRONG thing.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/27007

-- 
Edit this bug report at http://bugs.php.net/?id=27007&edit=1

Reply via email to