Skip to content

Windows 11 operation not supported #82

@tw2066

Description

@tw2066
<?php
// hello.php

use TrueAsync\HttpServer;
use TrueAsync\HttpServerConfig;

$server = new HttpServer(
    (new HttpServerConfig())
        ->addListener('0.0.0.0', 8611)
);

$server->addHttpHandler(function ($request, $response) {
    $response
        ->setStatusCode(200)
        ->setHeader('Content-Type', 'text/plain')
        ->setBody('Hello, World!');
});

$server->start();

error

PS D:\work\async> php .\http.php
PHP Fatal error:  Uncaught Async\AsyncException: Failed to bind to 0.0.0.0:8611: operation not supported on socket in D:\work\async\http.php:19
Stack trace:
#0 D:\work\async\http.php(19): TrueAsync\HttpServer->start()
#1 {main}
  thrown in D:\work\async\http.php on line 19

Fatal error: Uncaught Async\AsyncException: Failed to bind to 0.0.0.0:8611: operation not supported on socket in D:\work\async\http.php:19
Stack trace:
#0 D:\work\async\http.php(19): TrueAsync\HttpServer->start()
#1 {main}
  thrown in D:\work\async\http.php on line 19

php-trueasync-0.7.0-php8.6-windows-x64.zip

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions