Questions tagged [openswoole]

14 questions
11
votes
4 answers

pcre2.h: No such file or directory

I try to install openswoole on my mac machine. I have this issue when installing it. /usr/local/Cellar/php@7.4/7.4.29/include/php/ext/pcre/php_pcre.h:25:10: fatal error: pcre2.h: No such file or directory #include "pcre2.h" I used the command brew…
user3818576
  • 2,979
  • 8
  • 37
  • 62
1
vote
0 answers

PHP Warning: Cannot load module "openswoole" because conflicting module "swoole" is already loaded in Unknown on line 0

I have a warning when I use any php command in terminal: PHP Warning: Cannot load module "openswoole" because conflicting module "swoole" is already loaded in Unknown on line 0 What can I uninstall and how on Ubuntu? I don't use swoole and…
milica98
  • 199
  • 8
1
vote
0 answers

Remove or Replace Server Header in Swoole WebSocket Response

I have created a Swoole WebSocket server using the example given on the official OpenSwoole website: https://openswoole.com/docs/modules/swoole-websocket-server#quick-start-example The response header returned by the server to the client contains…
Rajan Sharma
  • 103
  • 1
  • 12
1
vote
0 answers

How to change database connection dynamically in laravel-octane?

I need to change database dynamically on the fly in laravel-octane or laravel-swoole package. I am working on a custom multi tenant system. Application is working fine without swoole/octane.
Al Emran
  • 46
  • 1
  • 6
0
votes
0 answers

OpenSwoole communicate with server from outside of the server

I created custom WebSocket with OpenSwoole & Laravel. The problem is I can't send data to the server in a convinient way. I want to send data between two seperate PHP processes. Currently I'm creating a new WebSocket client, connecting to server…
megasteve
  • 22
  • 2
  • 7
0
votes
1 answer

how to fix swoole_version not found with docker.io/openswoole/swoole:php7.4-alpine, even with openswoole.so loaded

I'm trying to text openswoole http server using docker image docker.io/openswoole/swoole:php7.4-alpine , but, I can't even find the function swoole_version(), I already check the php --ri openswoole, the libs is there. This is the…
Benyamin Limanto
  • 775
  • 10
  • 24
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
1 answer

How to access session data in OpenSwoole WebSocket server?

I have a small websocket server implemented in OpenSwoole. Is there a way to access the users session data? I tried this:
Hokascha
  • 1,709
  • 1
  • 23
  • 41
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

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

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

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