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
0 answers

How to install a specific version of Swoole in WHM

I would like to install SWOOLE on WHM and I want to download a specific version (4.8.1) But I can't only download the latest version, which is 5.0.1, and I want to download 4.8.1. Is there any way to install it... I tried the download from Module…
Rand Ahmad
  • 11
  • 1
0
votes
2 answers

How to refresh changes in swoole PHP

I created one folder with two files, one is index.php and one is Dockerfile and in terminal I run php index.php and it started on http://127.0.0.1:9501/, but when I change hello world in something else, it doesn't show new change on that link.. it…
milica98
  • 199
  • 8
0
votes
2 answers

Why Laravel doesn't accept changes until I stop swoole

Every time I make some change in Laravel, I need to do php artisan swoole:http stop and after that php artisan swoole:http start. It doesnt see my changes until I do that. Is there any other way to reloading server, or what..Also, when I do…
milica98
  • 199
  • 8
0
votes
0 answers

Why i get fatal error when installing laravel octane swoole?

i want to install swoole mode in laravel octane but when in use command : pecl install swoole this error is happen Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\php\pear\PEAR\Config.php on…
Peyman Khn
  • 87
  • 1
  • 3
0
votes
1 answer

PHP Swoole: how to make variables persistent between requests?

As a simple example, say I simply want to increment a counter when someone connects. The code I have is use Swoole\WebSocket\Server; use Swoole\Http\Request; use Swoole\WebSocket\Frame; $server = new Server("0.0.0.0", 9502); $users =…
0
votes
0 answers

How to return response from a go function coroutine

I'm using the Laravel Swoole Coroutine go function to do a HTTP request in order to achieve better performance. When I get the response from the external service, a new entry is created in the database with the data from the external service. I want…
Mireko
  • 41
  • 1
  • 4
0
votes
1 answer

Sending large files Swoole with Laravel/Octane

I'm having issues with uploading files now that I'm using octane. At first I couldn't send files larger than 2M, reading this post: https://ghostzero.dev/blog/set-custom-package-max-length-for-swoole-in-laravel-octane I managed to solve Now it is…
R. Pêgo
  • 13
  • 4
0
votes
0 answers

swoole+laravel reconnect every new worker

I'm using swoole create an Async-Style tcp server. and manager the message using laravel eloquent. when access Eloquent operation,error occurred PHP Fatal error: Uncaught Swoole\Error: Socket#12 has already been bound to another coroutine#151,…
rain hon
  • 11
  • 2
0
votes
0 answers

How to setup laravel-docker+swoole without sail

I am trying to migrate my website to docker, but the problem arrives when I need to add it octane+swoole, I cant find a good tutorial, most of them uses laravel sail, but sail is not for production, for example this…
DeveloperX
  • 517
  • 5
  • 23
0
votes
1 answer

How can I share PHP objects between Swoole workers/processes

I am using Swoole to develop my own WebSocket server with custom logic. I've made simple wrapper for Swoole\WebSocket\Server and implemented some classes that work as event handlers. Here is wrapper example: final class Server { private…
MihaOo
  • 9
  • 3
0
votes
1 answer

Has anyone got Xdebug working with Laravel Octane?

We are using Laravel Octane (with Swoole) and are struggling to get Xdebug working consistently (PhpStorm and Docker). It seems to work (hits breakpoints) and then stops when we make code changes. Is this something to do with Swoole? Do we need to…
Mick
  • 1,401
  • 4
  • 23
  • 40
0
votes
0 answers

There was an error installing Swoole php-cp, how can I fix the problem?

Have error building of swoole/php-cp Ubuntu 20.04 PHP7.4 How can fix this error?
Tilon UZ
  • 1
  • 2
0
votes
1 answer

Laravel ShouldQueue returns incorrect result on swoole server

Description When calling a service defined as a facade in a Job implemented as ShouldQueue, an incorrect result is displayed. Octane Version: 1.2.12 Laravel Version: 9.9.0 PHP Version: 8.1.6 Server & Version: Swoole 4.8.5 Steps To…
dvlpr91
  • 11
  • 3
0
votes
1 answer

Swoole process is hanging forever

I have the simplest Swoole code, which sleeps for a second and prints "Run task" message to the screen.
0
votes
0 answers

PHP Generate Dynamic Function calls array

I am using php laravel threading using octane and swoole server for concurrent processing. when I pass static process function list as below it works. $ArrayProcess = [ fn () => $this->getPropertyData(), fn () =>…