• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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