Bug #60727 [Opn->Bgs]: summary?
| From: | cataphract@php.net | Date: | Thu, 12 Jan 2012 21:07:31 +0000 |
| Subject: | Bug #60727 [Opn->Bgs]: summary? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166406@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60727&edit=1
ID: 60727
Updated by: cataphract@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