Doc #78657 [NEW]: 'broken pipe' unless socket connected first

From: Date: Wed, 09 Oct 2019 13:47:56 +0000
Subject: Doc #78657 [NEW]: 'broken pipe' unless socket connected first
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16996@lists.php.net to get a copy of this message
From: a dot a dot paul at gmail dot com Operating system: Android PHP version: 7.3.10 Package: *General Issues Bug Type: Documentation Problem Bug description:'broken pipe' unless socket connected first Description: ------------ --- From manual page: https://php.net/function.socket-sendto --- Documentation states: "Sends a message to a socket, whether it is connected or not" In practice PHP returns a 'broken pipe' error if the socket is not connected. See description at stack overflow : https://stackoverflow.com/questions/41624814/php-socket-sendto-cannot-connect-to-any-host Test script: --------------- <?php $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); $msg = "Ping !"; $len = strlen($msg); socket_connect($sock, '127.0.0.1', 1223); // this line missing from documentation socket_sendto($sock, $msg, $len, 0, '127.0.0.1', 1223); socket_close($sock); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=78657&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78657&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78657&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78657&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78657&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78657&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78657&r=support Expected behavior: https://bugs.php.net/fix.php?id=78657&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78657&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78657&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78657&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78657&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78657&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78657&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78657&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78657&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78657&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78657&r=mysqlcfg

« previous php.doc.bugs (#16996) next »