
The swoole framework is a very magical and powerful framework, which makes up for some of the shortcomings of PHP itself. In fact, swoole is a PHP extension written in C language, but this extension cannot be used on Windows systems. (Recommended learning: swoole video tutorial )
Cygwin is a UNIX-like simulation environment running on the windows platform. Since it is a simulation environment, it is easy to handle! Next We officially start to talk about how to build a swoole environment
1. Download Swoole and Cygwin

##Download Cygwin, my It is 64-bit
21 Install Cygwin

Select the software package to install, you need to install it here gcc, php, php development tools, autoconf, pcre-devel, and other defaults. Note here that after searching in the search bar above, find the corresponding software package below and select it, and click the Next button to start the installation.
(Note: The screenshot below is the interface after I installed it. The click position is the same, but the icons behind may be different)
First search for gcc

Then php

Then pcre-devel

Finally autoconf

In the end, just go to the next step to install.

2 Install Swoole
Extract the source program of swoole to the Cygwin home directory and open the Cygwin software (note: if your Cygwin is also installed on the C drive, then you have to pay attention. There may be an error when installing swoole. The solution is to right-click Open Cygwin as an administrator)

1 The environment at this time is like a Linux terminal, and the root directory is the Cygwin installation directory. Enter the command in the interface: cd /home/ swoole-src, where swoole-src is the decompressed source program

2 The environment at this time is like a Linux terminal, and the root directory is the Cygwin installation directory , enter the command on the interface: cd /home/swoole-src, where swoole-src is the decompressed source program

3 Enter the command: phpize to generate the compiled Configuration file configure

4 Enter the command: ./configure && make && make install

##Configure, compile, compile Install swoole
(PS: Execute ./configure, in addition to compiling the configuration, it will also detect the environment, etc.)
5Use the command: php -i | grep php.ini to find The path to the configuration file php.ini used by php cli, modify the php.ini file, add a line in the file: extension=swoole.so, then close and exit

6 /extension Search Press n to search again

7 Add extension=swoole.so

8 :wq Save and exit
9 Use the command: php -m to view the loaded modules. If you see swoole, the extension is added successfully and the environment is successfully built!

The above is the detailed content of Does swoole currently not support windows?. For more information, please follow other related articles on the PHP Chinese website!