#16664 [Fbk->NoF]: PHP crashes on socket_bind

From: Date: Sun, 25 Aug 2002 05:00:09 +0000
Subject: #16664 [Fbk->NoF]: PHP crashes on socket_bind
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17779@lists.php.net to get a copy of this message
 ID:               16664
 Updated by:       php-bugs@lists.php.net
 Reported By:      tech@kalyweb.com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Sockets related
 Operating System: Windows 9x
 PHP Version:      4.2.0
 New Comment:

No feedback was provided for this bug for over a month, 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".


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

[2002-04-18 10:59:11] mfischer@php.net

Wait, did you test with CVS now?!

It's supposed to ONLY return boolean false or true (from reading the
source code).

Can you verify this too please.

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

[2002-04-18 09:27:38] tech@kalyweb.com

Oops !!
I made an error, socket_bind returns 1 on success.
True = -1

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

[2002-04-18 09:17:28] tech@kalyweb.com

The CSV version doesn't include this bug anymore.

Just one more thing : socket_bind() returns '' on success ...

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

[2002-04-18 07:34:08] tech@kalyweb.com

This problem doesn't happens on w2k ...
It's w9x specific problem (win95 is also concerned).

PS: My test code was found in the documentation. I've updated my code
...
PS2: I'll look in the source and do some tries to find a way to fix
this bug (I have VC++, I could use another compiler but I have only
this one).

I know it's a bind error and if the IP is changed to "" no error
happens ...

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

[2002-04-18 07:21:39] mfischer@php.net

Ok, I can't reproduce this on w2k (I don't have a w98 system to test).

First, try if it works on w2k for you. If it works, we know it's w98
system problem and we can dig furhter into that direction.

Second, your return checking's aren't very good. socket_create()
returns either resource or false, but not something which we would say
is '< 0'.

The same for socket_bind(), it returns an boolean, true or false,
nothing else.

(that's from the source, the documentation on php.net is outdated as
there have been recent changes to the sources).

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

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/16664

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



Thread (12 messages)

« previous php.bugs (#17779) next »