-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid server options #49
Comments
Hi @ghnp5 Can you show how you set those options as code? My guess is you try to fix the "PORT" configuration with server options. Thus, they're invalid. "PORT" cannot recognize server options. OpenSwoole\Server\Port::set(): |
Hi, Thank you for your reply. I have basically copy/pasted the server config code example in https://openswoole.com/docs/modules/swoole-server/configuration Like this:
On the call to Thank you very much. |
Hi @ghnp5 , What is the namespace of "Server" class? You can see it initial of that file with "use" keyword. It should be the following one; $server = new OpenSwoole\HTTP\Server("127.0.0.1", 9501); Maybe that "Server" class refers to "OpenSwoole\Server\Port" in your file. |
Thanks. What I have is this:
|
I'm just a user of Swoole but the docs say the following one, can you try it again? If it doesn't work I'll try to reproduce it because I wondered the solution. $server = new OpenSwoole\Server https://openswoole.com/docs/modules/swoole-server/configuration |
Where in the docs does it say like that? In the Get Started (and all other examples I've seen), it has the way I have it now. https://openswoole.com/docs/get-started-swoole
|
For example, on this page https://openswoole.com/docs/modules/swoole-server/configuration It says; "OpenSwoole Server configurations can be set with $server->set once you have created your server with $server = new OpenSwoole\Server." |
I just ran into similar issue when trying to set Here's how they configure it, using the
Any my options are pretty simple:
PHP 8.2.7, OpenSwoole 22.0.0. |
I followed this example as a template for my server config:
https://openswoole.com/docs/modules/swoole-server/configuration
However, it appears that a number of settings are invalid:
pecl list | grep swoole
openswoole 22.0.0 stable
The text was updated successfully, but these errors were encountered: