Bug #78209 [Ver->Csd]: socket not connected

From: Date: Wed, 26 Jun 2019 15:06:14 +0000
Subject: Bug #78209 [Ver->Csd]: socket not connected
References: 1  Groups: php.bugs php.qa 
Request: Send a blank email to php-bugs+get-221505@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78209&edit=1

 ID:                 78209
 Updated by:         cmb@php.net
 Reported by:        v-altruo at microsoft dot com
 Summary:            socket not connected
-Status:             Verified
+Status:             Closed
 Type:               Bug
 Package:            Testing related
 Operating System:   Windows
 PHP Version:        7.3.7RC3
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Test removed with commit 7d28a24[1].

[1] <http://git.php.net/?p=php-src.git;a=commit;h=7d28a24c6602a0cf66def582c82712408254f81d>


Previous Comments:
------------------------------------------------------------------------
[2019-06-26 15:00:27] cmb@php.net

Thanks for reporting!

The only sensible action with regard to this broken test, is to
remove it from PHP 7.2+ (it has already been removed from PHP
7.4+).

------------------------------------------------------------------------
[2019-06-25 17:53:51] v-altruo at microsoft dot com

Description:
------------
Test fails across all builds regardless of opcache on/off. This also fails for 7.2.20RC3. 

Failed Test File: ext\standard\tests\streams\stream_socket_sento.phpt

Test script:
---------------
$serverUri = "tcp://127.0.0.1:31854";
$serverUrl = "http://php.net";
$stringSocket = "out of band data.";
$stringFWrite = "normal data to transmit";
$sock = stream_socket_server($serverUri, $errno, $errstr);

if (is_resource($sock)) {
    fwrite($sock, $stringFWrite);
    var_dump(stream_socket_sendto());
    var_dump(stream_socket_sendto($sock));
    var_dump(stream_socket_sendto($sock, $stringSocket));
    var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB));
    var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB, $serverUri));
    var_dump(stream_socket_sendto($sock, $stringSocket, STREAM_OOB, $serverUrl));
} else {
    die("Test stream_socket_enable_crypto has failed; Unable to connect: {$errstr}
({$errno})");
}

Expected result:
----------------
Notice: fwrite(): send of %i bytes failed with errno=%i Broken pipe in %s on line %i

Warning: stream_socket_sendto() expects at least %i parameters, %i given in %s on line %i
bool(%s)

Warning: stream_socket_sendto() expects at least %i parameters, %i given in %s on line %i
bool(%s)

Warning: stream_socket_sendto(): Broken pipe
 in %s on line %i
int(%i)

Warning: stream_socket_sendto(): Broken pipe
 in %s on line %i
int(%i)

Warning: stream_socket_sendto(): php_network_getaddresses: getaddrinfo failed: Name or service not
known in %s on line %i

Warning: stream_socket_sendto(): Failed to resolve %s: php_network_getaddresses: getaddrinfo failed:
Name or service not known in %s on line %i

Warning: stream_socket_sendto(): Failed to parse %s into a valid network address in %s on line %i
bool(%s)

Warning: stream_socket_sendto(): php_network_getaddresses: getaddrinfo failed: Name or service not
known in %s on line %i

Warning: stream_socket_sendto(): Failed to resolve %s: php_network_getaddresses: getaddrinfo failed:
Name or service not known in %s on line %i

Warning: stream_socket_sendto(): Failed to parse %s into a valid network address in %s on line %i
bool(%s)

Actual result:
--------------
Notice: fwrite(): send of 23 bytes failed with errno=10057 A request to send or receive data was
disallowed because the socket is not connected and (when sending on a datagram socket using a sendto
call) no address was supplied.
 in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 9

Warning: stream_socket_sendto() expects at least 2 parameters, 0 given in
C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 10
bool(false)

Warning: stream_socket_sendto() expects at least 2 parameters, 1 given in
C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 11
bool(false)

Warning: stream_socket_sendto(): A request to send or receive data was disallowed because the socket
is not connected and (when sending on a datagram socket using a sendto call) no address was
supplied.

 in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 12
int(-1)

Warning: stream_socket_sendto(): A request to send or receive data was disallowed because the socket
is not connected and (when sending on a datagram socket using a sendto call) no address was
supplied.

 in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 13
int(-1)

Warning: stream_socket_sendto(): php_network_getaddresses: getaddrinfo failed: No such host is
known.  in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on
line 14

Warning: stream_socket_sendto(): Failed to resolve `tcp': php_network_getaddresses: getaddrinfo
failed: No such host is known.  in
C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 14

Warning: stream_socket_sendto(): Failed to parse `tcp://127.0.0.1:31854' into a valid network
address in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on
line 14
bool(false)

Warning: stream_socket_sendto(): php_network_getaddresses: getaddrinfo failed: No such host is
known.  in C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on
line 15

Warning: stream_socket_sendto(): Failed to resolve `http': php_network_getaddresses:
getaddrinfo failed: No such host is known.  in
C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 15

Warning: stream_socket_sendto(): Failed to parse `http://php.net' into a valid network address in
C:\...\php-test-pack-7.2.20RC3\ext\standard\tests\streams\stream_socket_sendto.php on line 15
bool(false)


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



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


Thread (3 messages)

« previous php.bugs (#221505) next »