Closed nizarnizario closed 8 years ago
PHP needs to be started by a web server in order to use the $_SESSION variable. The Websocket server is started by the command line, not a web server.
However, the session cookies are available during the handshake. You can use that value, along with session_name()
and session_start()
to populate the $_SESSION variable. Just be sure that you write and close the session as soon as you're done, otherwise it'll be locked and could cause some difficult to troubleshoot issues.
Hello, is there a way to use this class with $_SESSION ? i tried , but i could find how,,,
can you help me ?