Edit report at https://bugs.php.net/bug.php?id=60727&edit=1
ID: 60727 Updated by: cataphr...@php.net Reported by: felix at codingshare dot de Summary: summary? -Status: Open +Status: Bogus Type: Bug Package: Sockets related Operating System: openSuse PHP Version: 5.4.0RC5 Block user comment: N Private report: N New Comment: 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. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2012-01-12 14:13:29] felix at codingshare dot de Description: ------------ Fatal error: Call to undefined function socket_create() in /home/faust/public_html/mysql/index.php on line 83 Test script: --------------- function ping($host, $timeout = 1) { /* ICMP ping packet with a pre-calculated checksum */ $package = "\x08\x00\x7d\x4b\x00\x00\x00\x00PingHost"; $socket = socket_create(AF_INET, SOCK_RAW, 1); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $timeout, 'usec' => 0)); socket_connect($socket, $host, null); $ts = microtime(true); socket_send($socket, $package, strLen($package), 0); if (socket_read($socket, 255)) $result = microtime(true) - $ts; else $result = false; socket_close($socket); return $result; } echo ping("google.de"); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60727&edit=1