Parameter must be passed by reference

Discussion about the open-source Phalanger [?] project.

Parameter must be passed by reference

Postby cariad@codeplex » August 11th, 2006, 11:43 pm

Hello, I've just begun trying Phalanger 2.0b2, and really like what I see.

However, when I try using the sockets extension, I get the following error when trying to call socket_select():
Error: Parameter '1' must be passed by reference in <script> at expression on line 29, column 5.

Any kind of help would be appreciated. Or is it a bug?

The script looks like this (basic only):

<?php

$address = '127.0.0.1';
$port = 6502;
$max_clients = 1;

// Set time limit to indefinite execution
settimelimit (0);

// Create a TCP Stream socket
$sock = socketcreate(AFINET, SOCK_STREAM, 0);
// Bind the socket to an address/port
socket_bind($sock, $address, $port) or die('Could not bind to address');
// Start listening for connections
socket_listen($sock);

// Loop continuously
$read = $client = array();
while (true) {

// Setup clients listen socket for reading
$read0 = $sock;
for ($i = 0; $i < $max_clients; $i++) {
if (@$client$i'sock' != null) $read$i + 1 = $client$i'sock';
}

// Set up a blocking call to socket_select()
$write = $except = $tv = null;
$ready = socket_select($read, $write, $except, $tv);

}

?>

And the config file:
<?xml version="1.0" encoding="UTF-8"?>

<configuration>
<phpNet>

<classLibrary>

<add assembly="php_sockets.mng, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="sockets" />

</classLibrary>

<sockets>

<!-- Use the system read() function instead of the php_read() wrapper. -->
<set name="sockets.usesystemread" value="On" />

</sockets>


</phpNet>

</configuration>
cariad@codeplex
 
Posts: 1
Joined: January 7th, 2012, 8:58 pm

RE: Parameter must be passed by reference

Postby Tomas Matousek » August 12th, 2006, 12:09 am

This discussion has been copied to Work Item 1969. You may wish to continue further discussion there.
Tomas Matousek
 
Posts: 17
Joined: January 7th, 2012, 8:52 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 22 guests

cron

User Control Panel

Login

Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 5 minutes)
Most users ever online was 297 on March 29th, 2024, 7:06 am

Users browsing this forum: No registered users and 22 guests