swoole / library

📚 Swoole Library
https://wiki.swoole.com/#/library
Apache License 2.0
233 stars 59 forks source link

Question about Swoole in cPanel #101

Closed fredroo closed 2 years ago

fredroo commented 3 years ago

How is the right way to use swoole

first i installed pecl install swoole inphp.iniAdded in the fileextension=swoole.soThis sentence

with "php - m" show swoole

work with php 7.3 or 8 or only 7.2

i need remove php-fpm or only disable or only above?

deminy commented 3 years ago

Latest versions of Swoole only work with PHP 7.1+:

Please make sure you are using PHP 7.1+. If you happen to use PHP 7.1, please install Swoole 4.5 instead (by running pecl install swoole-4.5.11).

Swoole and PHP-FPM can be installed/loaded at the same time, but it doesn't mean you can use Swoole under PHP-FPM. Swoole should be used under CLI mode.

fredroo commented 3 years ago

only show with php -m in 7.2 and 7.3 version, swoole 4.6.4, php.ini have extension line

now running php 7.3 and php-fpm, can let this way, gonna work or better remove php-fpm?

sy-records commented 3 years ago

You can use two different ini files for cli and php-fpm

fredroo commented 3 years ago

in cpanel php.ini is under in /opt/cpanel/ea-php73/root/etc/php.ini is easy apache control

AngusDV commented 2 years ago

sudo /opt/cpanel/ea-php80/root/usr/bin/pecl install swoole but get error

sh: /root/tmp/pear/swoole/configure: No such file or directory ERROR: `/root/tmp/pear/swoole/configure --with-php-config=/opt/cpanel/ea-php80/root/usr/bin/php-config --enable-sockets=yes --enable-openssl=no --enable-http2=no --enable-mysqlnd=no' failed

AngusDV commented 2 years ago

/opt/cpanel/ea-php80/root/usr/bin/pear install swoole-4.8.8.tgz 411 source files, building running: phpize enable sockets supports? [no] : yes enable openssl support? [no] : enable http2 support? [no] : enable mysqlnd support? [no] : enable json support? [no] : enable curl support? [no] : building in /root/tmp/pear/pear-build-rootiqkdss/swoole-4.8.8 running: /root/tmp/pear/swoole/configure --with-php-config=/opt/cpanel/ea-php80/root/usr/bin/php-config --enable-sockets=yes --enable-openssl=no --enable-http2=no --enable-mysqlnd=no --enable-swoole-json=no --enable-swoole-curl=no sh: /root/tmp/pear/swoole/configure: No such file or directory ERROR: `/root/tmp/pear/swoole/configure --with-php-config=/opt/cpanel/ea-php80/root/usr/bin/php-config --enable-sockets=yes --enable-openssl=no --enable-http2=no --enable-mysqlnd=no --enable-swoole-json=no --enable-swoole-curl=no' failed

AngusDV commented 2 years ago

my problem solved . server administration changed tmp partition.