Bug #78209 [NEW]: socket not connected
| From: | v-altruo at microsoft dot com | Date: | Tue, 25 Jun 2019 17:53:51 +0000 |
| Subject: | Bug #78209 [NEW]: socket not connected | ||
| Groups: | php.bugs php.qa | ||
| Request: | Send a blank email to php-bugs+get-221488@lists.php.net to get a copy of this message | ||
From: v-altruo at microsoft dot com
Operating system: Windows
PHP version: 7.3.7RC3
Package: Testing related
Bug Type: Bug
Bug description:socket not connected
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 bug report at https://bugs.php.net/bug.php?id=78209&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78209&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78209&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78209&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78209&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78209&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78209&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78209&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78209&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78209&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78209&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78209&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78209&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78209&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78209&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78209&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78209&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78209&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78209&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78209&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78209&r=mysqlcfg