Questions tagged [swoole]

Swoole is an open source async framework for PHP.

Swoole is an event-driven asynchronous and concurrent networking communication framework with high performance written only in C for PHP.

The network layer in Swoole is event-based and takes full advantage of the underlying epoll/kqueue implementation, making it really easy to serve thousands of connections.

More information can be found on GitHub and the Swool website.

92 questions
0
votes
1 answer

does swoole table destroy itself when swoole websocket server shuts down

i am setting up a Swoole web socket server for my chat application on CentOS 7 host machine. and will use Swoole table for storing users list. But i am not sure what is the lifespan like for Swoole table. when the Swoole Server shuts down by…
suyuan xu
  • 120
  • 5
0
votes
1 answer

API Platform with alternative Runtime, Caddy, Vulcain, Cache ecosystem

Currently I'm investigating a setup backed by api-platform with the following goals: the PHP backend MUST yield minimal resource payloads, thus I do not want to embed relations at all the PHP backend SHOULD be able to run in alternative runtimes,…
Oliver Mack
  • 107
  • 5
0
votes
1 answer

Setting cookies in Laravel Octane / Swoole

I'm attempting to set cookies on Laravel Octane, however the cookies appear to be not defined on the given index. setcookie(self::JWT_TOKEN_COOKIE, $token_details['access_token'], [ 'httponly' => true, 'expires' => time() +…
Oliver Kucharzewski
  • 2,523
  • 4
  • 27
  • 51
0
votes
1 answer

Laravel/Octane: How to reset route controllers' state

In Laravel v9/Octane/Swoole, I do have private properties in route controllers, e.g. namespace App\Http\Controllers\API; use App\Http\Controllers\Controller; class SignupController extends Controller { /** @var ?\App\SignupCode A verification…
0
votes
1 answer

configuring swoole http-server without nginx in front

how can I configure a swoole http-server without nginx? my problem is domain routing. where can I configure a specific domain for swoole http-server in laravel octane? I have configured an nginx on my server that points to my subdomains…
0
votes
0 answers

Handling gRPC requests with client-stream and/or server-stream in mezzio-swoole (PHP), is it possible?

The framework is Mezzio and the server is Swoole, both the latest version. Please note that Mezzio is just an example but Swoole is the main case. When a request is arrived, swoole onRequest event is triggered and EventDispatcher dispatches the…
0
votes
0 answers

php swoole with MSSQL

i want to use swoole for a new project. Is there a way to use swoole with MSSQL? I read in the docs that they have coroutines for MySql, Postgres, Redis. But I didn't find anything about MSSQL.
mantsap
  • 41
  • 4
0
votes
1 answer

Define global constant with mezzio swoole/openswoole

im trying to set a global constant that would be accessible to all php swoole processes and threads later, but it seems to be not visible or something Here's my index.php - almost vanilla mezzio - I only see APPROOT constant: (function () { if…
Dannyboy
  • 1,963
  • 3
  • 20
  • 37
0
votes
1 answer

file_get_contents('php://input') not working on Laravel+Octane / Swoole

I'm migrating from Laravel 8 to Laravel 8 + Octane / Swoole. All works fine, but php://input always are empty. Also, I check $_POST and $_SERVER values. file_get_contents('php://input') is used by AWS SNS Message Validator. Any alterantive to read…
pablorsk
  • 3,861
  • 1
  • 32
  • 37
0
votes
2 answers

How to install SWOOLE in a Dockerfile for Laravel8/PHP8 project?

I'll build a Laravel 8 app. The PHP language level is PHP8. How can I integrate Swoole in my Dockerfile? Actually I try it this way: RUN pecl channel-update https://pecl.php.net/channel.xml \ && pecl install swoole But if I build the…
Manny
  • 79
  • 1
  • 10
0
votes
1 answer

PHP Swoole coroutine, async messages not async

I am running a Swoole WebSocket server and I am trying to send messages to end users while a script is running. The problem I am having is that the messages aren't sent asynchronously, and are only sent once the script finishes execution. Which sort…
dearsina
  • 4,774
  • 2
  • 28
  • 34
0
votes
1 answer

How to execute functions asynchronously with SWOOLE?

I have heard promising words about php's Swoole project. However, in their doc/examples, I only see the implementation of server handlings (i.e. how to setup webserver, answer requests, etc..). However, I was unable to find examples, how to simply…
T.Todua
  • 53,146
  • 19
  • 236
  • 237
0
votes
1 answer

swoole hello world on server

I am new to swoole and I am successfully done hello world on y local machine. But when i push the code on the server it doesn't work. I changed the server url and port but nothing worked I just want to display a Hello message on my URL when someone…
Manoj Dhiman
  • 5,096
  • 6
  • 29
  • 68
0
votes
1 answer

GZip not working in Laravel + OpenLiteSpeed

I created a Laravel project and put it on the OpenLightSpeed web ​​server. Everything works fine but gzip does not work! Light Speed ​​cache settings are enabled but still gzip not enabled on port 8000. OpenLiteSpeed GZip Settings GZip Work…
Mobin Soft
  • 13
  • 1
  • 3
0
votes
1 answer

PHP Swoole Notice ERRNO 1005

When Swoole is on heavy load and heavy requests I kept getting this Log: [2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not…
Mr.Apr
  • 66
  • 1
  • 6