Swoole FAQ: Introduction to 'It is present in phpinfo but not in php -m'
Yes in phpinfo but not in php -m
First confirm whether it is in CLI mode
Command line input php --ri swoole
If the extended information of swoole is output, it means that your installation is successful!
99.999% of people are at this step If successful, you can use swoole directly
You don’t need to worry about whether php -m or phpinfo web page prints out whether there is swoole
Because swoole runs in cli mode and functions in traditional fpm mode Very limited
Any asynchronous/coroutine and other major functions cannot be used in fpm mode. 99.999% of people cannot get what they want in fpm mode, but they are confused about why there is no extended information in fpm mode
First make sure you truly understand the operating mode of swoole before continuing to investigate the installation information issue!
Cause
After compiling and installing swoole, It is available in the phpinfo page of php-fpm/apache, but not in the php -m on the command line. The reason may be that cli/php-fpm/apache uses different php.ini configuration
Solution
1. Confirm the location of php.ini
cli command line
php -i|grep php.ini
or
php --ini php-fpm/apache,查看phpinfo页面找到php.ini的绝对路径。
2. Check whether the corresponding php.ini has extension=swoole.so
cat /path/to/php.ini | grep swoole.so
Why can I see the web page from the command line? If you don’t read the above carefully in
, it shows that the ini configuration files in cli and apache/fpm modes are in different locations, and you need to find the correct ini file.
Recommended study: swoole tutorial
The above is the detailed content of Swoole FAQ: Introduction to 'It is present in phpinfo but not in php -m'. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1
Easy-to-use and free code editor
