0

I'm trying to install a PHP script on my server but keep getting an error...

[08-Sep-2014 15:13:32 UTC] PHP Strict Standards: Only variables should be passed by reference in /public_html/server/websocket.class.php on line 30

[08-Sep-2014 15:13:32 UTC] PHP Strict Standards: Only variables should be passed by reference in public_html/server/websocket.class.php on line 30

Code on line 30: socket_select($changed, $write = NULL, $except = NULL, NULL);

Can anyone help?

1 Answers1

2

you need to pass variables:

$write = NULL;
$except = NULL; 

socket_select($changed, $write, $except, NULL);

as socket_select() takes references as parameters

this is because expression $write = NULL passes result to function which is NULL not $write

Peter
  • 16,453
  • 8
  • 51
  • 77
  • I tried this and still had no luck... :/ Would you mind if I sent you the file and you had a look at it? Upload it to my Dropbox for you? – ashbridge Sep 08 '14 at 15:48
  • Here is a link to the file... Server.php - https://www.dropbox.com/s/g8ose87vfqib5v4/server.php?dl=0 websocket.class - https://www.dropbox.com/s/lceirwu05suhh0d/websocket.class.php?dl=0 The websocket is the file that errors! :( – ashbridge Sep 09 '14 at 13:21
  • @ashbridge yes so use my answer? change `socket_select($changed, $write = NULL, $except = NULL, NULL);` to code from my answer.... – Peter Sep 10 '14 at 10:32