Only variables can be passed by reference
Moderator: General Moderators
-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
Only variables can be passed by reference
I tried this tutorial, http://devzone.zend.com/node/view/id/1086 - The making of a real server
in line 30, i am getting an error,
Only variables can be passed by reference
in line 30, i am getting an error,
Only variables can be passed by reference
-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
Code: Select all
$ready = socket_select($read,null,null,null);tryinstead.
Code: Select all
$ready = socket_select($read,$write=null,$ex=null);-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
thanks, that error vanished, i am getting a warning,
Warning: socket_bind() [function.socket-bind]: unable to bind address [0]: Only one usage of each socket address (protocol/network address/port) is normally permitted. in C:\wamp\www\zend.php on line 16
Could not bind to address
i modified the code to,
at the top.
line 16 :
Warning: socket_bind() [function.socket-bind]: unable to bind address [0]: Only one usage of each socket address (protocol/network address/port) is normally permitted. in C:\wamp\www\zend.php on line 16
Could not bind to address
i modified the code to,
Code: Select all
$address = $_SERVER['REMOTE_ADDR'];
$port = 80;
$max_clients = 10;line 16 :
Code: Select all
socket_bind($sock, $address, $port) or die('Could not bind to address');please try
Code: Select all
echo "socket_bind($sock, $address, $port) or die('Could not bind to address');\n";
socket_bind($sock, $address, $port) or die('Could not bind to address');-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
Code: Select all
$address=$_SERVER['REMOTE_ADDR'];
//$address = '192.168.0.100';
$port = 120;
$max_clients = 10;Code: Select all
echo "socket_bind($sock, $address, $port) or die('Could not bind to address')\n";
socket_bind($sock, $address, $port) or die('Could not bind to address');output:
socket_bind(Resource id #2, 192.168.0.1, 120) or die('Could not bind to address');
Warning: socket_bind() [function.socket-bind]: unable to bind address [0]: Only one usage of each socket address (protocol/network address/port) is normally permitted.