• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Cant install Swoole on PHP 7.3

Martin.H

Regular Pleskian
I tried to install swoole as I need it, but strange I got an Error but for me this seems to be impossible.

This is the command I run:

root@server:~# /opt/plesk/php/7.3/bin/pecl install swoole

But I do get the Error:


In file included from /tmp/swoole/php_swoole_cxx.h:19:0,
from /tmp/swoole/php_swoole_cxx.cc:1:
/tmp/swoole/php_swoole.h:139:2: error: #error "require PHP version 7.1 or later"
#error "require PHP version 7.1 or later"
^~~~~
Makefile:194: recipe for target 'php_swoole_cxx.lo' failed
make: *** [php_swoole_cxx.lo] Error 1
ERROR: `make' failed


But how do I get an Error who is stating "require PHP version 7.1 or later" when I execute it with php7.3
Also I do not have PHP 7.0 installed anyway!

My installed PHP Versions:

PHP 7.3
PHP 7.2
PHP 7.1

When I log in as Admin and execute "php -v" I get:

root@server:~# php -v
PHP 7.3.11 (cli) (built: Oct 25 2019 03:53:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies


How can I install swoole on Plesk with PHP 7.3 or even better systemwide?
 
I have installed it without any problems with the following steps:

# yum install make gcc plesk-php73-devel
# /opt/plesk/php/7.3/bin/pecl install swoole
# echo "extension=swoole.so" > /opt/plesk/php/7.3/etc/php.d/swoole.ini
# plesk bin php_handler --reread

As a result:

# /opt/plesk/php/7.3/bin/php -m | grep swoole
swoole

Try it.
 
Back
Top