As no one else has stepped up, I'll take an educated guess (having never used the websocket protocol).
I think that what you see and have posted is the complete "error".
Code:
<unavailable>
Socket Closed
The target or socket is
unavailable, so you are receiving the
onclose event message. There is no additional
error to report in the client context.
To work, the socket must have been defined in the headers received from the server in response to the initial request, if I have understood the protocol from an admittedly quick reading.
This:
Code:
ws://d30:9000/socket.php
...doesn't have meaning without any server context.
From what I have quickly surmized about websockets I think we need to know what is in the server response headers and the server.php code. You should check any errors on the server generated by that code. You cannot simply open a websocket to your server from javascript.
This explanation appears to describe the required handshake, server side php requirements, response headers and session communications.
Hope that helps.