php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51152 socket_select
Submitted: 2010-02-26 07:35 UTC Modified: 2010-02-28 16:48 UTC
From: 9669105 at qq dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.13 OS: windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 9669105 at qq dot com
New email:
PHP Version: OS:

 

 [2010-02-26 07:35 UTC] 9669105 at qq dot com
Description:
------------
I am not good at english . 

I pass an array with 257 sockets to monitor for changes, a warning :
unable to select [0]:An operation was attempted on something that is not a socket.

Why?

Reproduce code:
---------------
$i = 0;
$sockets = array();
while (true) {
	$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
	if (socket_connect($socket, '192.168.1.101', 11001)) {
		socket_set_nonblock($socket);
		$sockets[] = $socket;
		$i = $i + 1;
	} else {
		break;
	}
}
echo $i;

Expected result:
----------------
$i=257 always.

How can pass an array more than 257 sockets ?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-28 16:48 UTC] jani@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 13:01:29 2024 UTC