Skip to content

Open source PHP extension for Async IO, Coroutines and Fibers

License

Notifications You must be signed in to change notification settings

Hailong/swoole-src

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Swoole Logo

lib-openswoole ext-openswoole test-linux Coverity Scan Build Status codecov GitHub stars Twitter

Open Swoole (since 2017) is a programmatic server for PHP with async IO, coroutines and fibers: secure, reliable, high performance

Documentation & Community

Installation

As with any open source project, Open Swoole always provides the most reliable stability and the most powerful features in the latest released version. Please ensure as much as possible that you are using the latest version.

Compiling requirements

  • Linux, OS X or Cygwin, WSL
  • PHP 7.2.0 or later (The higher the version, the better the performance.)
  • GCC 4.8 or later

1. Install with PECL (beginners)

pecl install openswoole

2. Install from source (recommended)

Please download the source packages from Releases or:

git clone https://github.com/openswoole/swoole-src.git && \
cd swoole-src
git checkout v4.8.1

Compile and install at the source folder:

phpize && \
./configure && \
make && make install

Enable extension in PHP

After compiling and installing the openswoole extension, you have to add a new line extension=openswoole.so to php.ini to enable Open Swoole. It is recommended to be added after all the other extensions because openswoole may depend on extensions: sockets, mysqlnd, curl etc.

Extra compile configurations

for example: ./configure --enable-openssl --enable-sockets

  • --enable-openssl or --with-openssl-dir=DIR
  • --enable-sockets
  • --enable-http2
  • --enable-mysqlnd (need mysqlnd, it just for supporting $mysql->escape method)
  • --enable-swoole-json
  • --enable-swoole-curl
  • --with-postgres[=DIR]

Upgrade

If you upgrade from source, don't forget to make clean before you upgrade your swoole

  1. pecl upgrade openswoole
  2. cd swoole-src && git pull && make clean && make && sudo make install
  3. if you have changed PHP version, please re-run phpize clean && phpize then try to compile

Call for Contributors

If you like to involve the maintenance of this repo, it is better to get started by submitting PR, you will be invited to the dev group once there are significant contributions. Or join Slack group firstly, the team will provide mentoring and internal support to help you get started.

This project exists thanks to all the historical [Contributors].

Security issues

Security issues should be reported privately, via email, to the Open Swoole develop team [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Frameworks & Components

PR are welcome if your framework is using openswoole

  • Laravel Octane Laravel Octane supercharges your application's performance by serving your application using high-powered application servers.
  • PHP Runtime make it easy to run any kind of PHP Application (Symfony, Laravel, PSR7, Native) with all kinds of Runtimes like OpenSwoole, Bref, Google Cloud Functions, Roadrunner and React PHP with minimal configuration.
  • Mezzio Swoole allows you to run Mezzio and PSR-15 applications on Open Swoole.

License

Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html

About

Open source PHP extension for Async IO, Coroutines and Fibers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 58.6%
  • PHP 36.8%
  • C 3.5%
  • M4 0.6%
  • Shell 0.2%
  • CMake 0.1%
  • Other 0.2%