Could not create socket for "ssl://0.0.0.0:443" #93
agus-prawoto
started this conversation in
General
Replies: 1 comment
-
|
I solved by myself, I used the following code: then in the httpd.conf, I add a line: and in the javascript i use the following code: Hope this help any others who have the same problem |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'am working around to create secure socket server on local development server using XAMPP
I successfully add SSL to localhost using my own generated certificate and successfully run https://site.test
Then I try to create a file socket-server.php dan write script bellow:
$server = new WebSocket\Server(ssl: true, port: 443); $server ->addMiddleware(new WebSocket\Middleware\CloseHandler()) ->addMiddleware(new WebSocket\Middleware\PingResponder()) ->onText(function (WebSocket\Server $server, WebSocket\Connection $connection, WebSocket\Message\Message $message) { $server->text(json_encode($message->getContent())); }) ->start();But when I try to run on browser https://site.test/socket-server.php, I got an error "Server failed to start: Could not create socket for "ssl://0.0.0.0:443":
Fatal error: Uncaught WebSocket\Exception\ServerException: Server failed to start: Could not create socket for "ssl://0.0.0.0:443". in D:\xampp-8.2.4\htdocs\aplikasi-antrian-pro\app\ThirdParty\Websocket\phrity\websocket\src\Server.php:375 Stack trace: #0 D:\xampp-8.2.4\htdocs\aplikasi-antrian-pro\app\ThirdParty\Websocket\phrity\websocket\src\Server.php(251): WebSocket\Server->createSocketServer() #1 D:\xampp-8.2.4\htdocs\aplikasi-antrian-pro\socket-server.php(10): WebSocket\Server->start() #2 {main} thrown in D:\xampp-8.2.4\htdocs\aplikasi-antrian-pro\app\ThirdParty\Websocket\phrity\websocket\src\Server.php on line 375
Note: The script above works when using non secure connection
$server = new WebSocket\Server(ssl: false, port: 3250);How to fix that error?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions