PHP Classes

Error undefined variable sk1 sk2

Recommend this page to a friend!

      PHP WebSockets  >  All threads  >  Error undefined variable sk1 sk2  >  (Un) Subscribe thread alerts  
Subject:Error undefined variable sk1 sk2
Summary:error
Messages:1
Author:Steffen Sperling
Date:2025-04-23 05:37:40
 

  1. Error undefined variable sk1 sk2   Reply   Report abuse  
Picture of Steffen Sperling Steffen Sperling - 2025-04-23 05:37:40
Microsoft Windows [Version 10.0.19045.5737]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Windows\System32>php -q C:\web\Apache24\htdocs\phpwebsocket\chatbot.demo.php
Server Started : 2025-04-23 07:19:13
Listening on : localhost port 12345
Master socket : Resource id #5

Resource id #6 CONNECTED!
23/4/2025 at 07:19:26 CEST

Requesting handshake...
GET /websocket/websocket.class.php HTTP/1.1
Host: localhost:12345
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Accept: */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: http://localhost
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: xTWfm4iNcSzPHxXMI6Jd3A==
Connection: keep-alive, Upgrade
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-site
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket


req: GET /websocket/websocket.class.php HTTP/1.1
Host: localhost:12345
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Accept: */*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: http://localhost
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: xTWfm4iNcSzPHxXMI6Jd3A==
Connection: keep-alive, Upgrade
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-site
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket


Last 8 bytes: cket


PHP Notice: Undefined variable: sk1 in C:\web\Apache24\htdocs\phpwebsocket\websocket.class.php on line 148

Notice: Undefined variable: sk1 in C:\web\Apache24\htdocs\phpwebsocket\websocket.class.php on line 148
PHP Notice: Undefined variable: sk2 in C:\web\Apache24\htdocs\phpwebsocket\websocket.class.php on line 148

Notice: Undefined variable: sk2 in C:\web\Apache24\htdocs\phpwebsocket\websocket.class.php on line 148
Handshaking...
Key1:
Key2:
Key1 Spaces: 0
Key2 Spaces: 0
Invalid key
HTTP/1.1 101 WebSocket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Origin: http://localhost
Sec-WebSocket-Location: ws://localhost:12345/websocket/websocket.class.php



Done handshaking...
Resource id #6 DISCONNECTED!