Unable to install php swoole on a fresh alma 8 + php 8.1 centmin server. Added it to custom config but php --ri swoole and php -r "print_r(get_loaded_extensions());" does not return it as installed. Please fill in any relevant information that applies to you: CentOS Version: Alma 8 Centmin Mod Version Installed: 130.00beta01 Nginx Version Installed: 1.25.3 PHP Version Installed: 8.1.27 MariaDB MySQL Version Installed: 10.6 When was last time updated Centmin Mod code base ? : Just prior Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command: Code (Text): cat /etc/centminmod/custom_config.inc CENTOS_ALPHATEST='y' NGINX_VERSION='1.25.0' NGINX_ONETWOTHREE_COMPAT='y' DEVTOOLSETTEN='n' DEVTOOLSETELEVEN='n' DEVTOOLSETTWELVE='y' SELFSIGNEDSSL_ECDSA='y' PHPFINFO='y' PYTHON_INSTALL_ALTERNATIVES='y' MARCH_TARGETNATIVE='n' DMOTD_PHPCHECK='y' NGINX_GEOIPTWOLITE='y' NGXDYNAMIC_GEOIPTWOLITE='y' NGINX_HPACK='y' NGINX_DYNAMICTLS='y' NGINX_PCRE_TWO='y' OPENSSL_VERSION='3.1.0' OPENSSL_VERSIONFALLBACK='3.1.0' OPENSSL_VERSION_OLDOVERRIDE='3.1.0' NGX_LDMOLD='y' PHP_LDMOLD='y' NGINX_NJS='y' NGXDYNAMIC_NJS='y' NGXDYNAMIC_BROTLI='y' NGINX_LIBBROTLI='y' NGINX_VIDEO='y' ENABLE_MARIADBTENFOURUPGRADE='y' ENABLE_MARIADBTENFIVEUPGRADE='y' ENABLE_MARIADBTENSIXUPGRADE='y' PHPSWOOLE='y' PHP UPGRADE LOG (pulled some relevant sections) Code (Text): LD_LIBRARY_PATH=/usr/local/lib64 PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig:" ../configure --enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --with-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --enable-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype --with-jpeg --with-png-dir=/usr --with-xpm --with-webp --with-t1lib=/usr --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --with-ldap --with-ldap-sasl --with-password-argon2 --with-sodium=/usr/local --with-pic --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --with-swoole --with-xsl configure: WARNING: unrecognized options: --with-mcrypt, --with-libzip, --with-mysql, --with-xmlrpc, --enable-gd-native-ttf, --with-png-dir, --with-t1lib, --with-mysql, --enable-inline-optimization, --with-swoole ..... Thank you for using PHP. configure: WARNING: unrecognized options: --with-mcrypt, --with-libzip, --with-mysql, --with-xmlrpc, --enable-gd-native-ttf, --with-png-dir, --with-t1lib, --with-mysql, --enable-inline-optimization, --with-swoole ...... --configure-options [--enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --with-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --enable-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype --with-jpeg --with-png-dir=/usr --with-xpm --with-webp --with-t1lib=/usr --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --with-ldap --with-ldap-sasl --with-password-argon2 --with-sodium=/usr/local --with-pic --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --with-swoole --with-xsl PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig: PNG_CFLAGS=-I/usr/include PNG_LIBS=-L/usr/lib64 -lpng16 ICU_CFLAGS=-fPIC ICU_LIBS=-L/usr/lib64 -licuio -licui18n -licuuc -licudata ONIG_CFLAGS=-I/usr/include ONIG_LIBS=-L/usr/lib64 -lonig LIBSODIUM_CFLAGS=-fPIC LIBSODIUM_LIBS=-L/usr/local/lib64 -lsodium ARGON2_CFLAGS=-I/usr/local/include ARGON2_LIBS=-L/usr/local/lib64 -largon2 LIBZIP_CFLAGS=-fPIC LIBZIP_LIBS=-L/usr/local/lib64 -lzip]
Strange just tried and it's working for me Code (Text): php --ri swoole swoole Swoole => enabled Author => Swoole Team <team@swoole.com> Version => 5.1.0 Built => Mar 22 2024 21:40:33 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.1.1k FIPS 25 Mar 2021 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.2.11 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled mysqlnd => enabled async_redis => enabled Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608 Code (Text): php -r "print_r(get_loaded_extensions());" Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => sqlite3 [6] => zlib [7] => bcmath [8] => bz2 [9] => calendar [10] => ctype [11] => curl [12] => dom [13] => enchant [14] => hash [15] => FFI [16] => fileinfo [17] => filter [18] => ftp [19] => gd [20] => gettext [21] => gmp [22] => json [23] => iconv [24] => SPL [25] => intl [26] => session [27] => ldap [28] => mbstring [29] => standard [30] => mysqlnd [31] => pcntl [32] => exif [33] => mysqli [34] => PDO [35] => pdo_mysql [36] => pdo_sqlite [37] => Phar [38] => posix [39] => pspell [40] => readline [41] => Reflection [42] => imap [43] => shmop [44] => SimpleXML [45] => snmp [46] => soap [47] => sockets [48] => sodium [49] => sysvmsg [50] => sysvsem [51] => sysvshm [52] => tidy [53] => tokenizer [54] => xml [55] => xmlreader [56] => xmlwriter [57] => xsl [58] => zip [59] => brotli [60] => geoip [61] => igbinary [62] => imagick [63] => lz4 [64] => lzf [65] => mailparse [66] => maxminddb [67] => mcrypt [68] => memcache [69] => memcached [70] => redis [71] => swoole [72] => timezonedb [73] => zstd [74] => Zend OPcache ) Code (Text): php-config Usage: /usr/local/bin/php-config [OPTION] Options: --prefix [/usr/local] --includes [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib] --ldflags [ -Wl,-z,relro,-z,now -pie -L/usr/local/lib64] --libs [-lcrypt -lc-client -ltidy -lresolv -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lbz2 -lutil -lrt -lm -ldl -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lsqlite3 -lz -lcurl -lxml2 -lenchant -lgmodule-2.0 -lglib-2.0 -lffi -lssl -lcrypto -lz -lpng16 -lwebp -ljpeg -lXpm -lX11 -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licuio -licui18n -licuuc -licudata -lonig -lsqlite3 -ledit -lxml2 -lnetsnmp -lm -lssl -lssl -lcrypto -lxml2 -lsodium -largon2 -lxml2 -lxml2 -lxml2 -lxslt -lm -lxml2 -lexslt -lxslt -lm -lgcrypt -ldl -lgpg-error -lxml2 -lzip -lz -lssl -lcrypto -lcrypt ] --extension-dir [/usr/local/lib/php/extensions/no-debug-non-zts-20210902] --include-dir [/usr/local/include/php] --man-dir [/usr/local/php/man] --php-binary [/usr/local/bin/php] --php-sapis [ cli embed fpm phpdbg cgi] --ini-path [/usr/local/lib] --ini-dir [/etc/centminmod/php.d] --configure-options [--enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --with-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --enable-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype --with-jpeg --with-png-dir=/usr --with-xpm --with-webp --with-t1lib=/usr --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --with-ldap --with-ldap-sasl --with-password-argon2 --with-sodium=/usr/local --with-pic --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --with-swoole --with-xsl PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig: PNG_CFLAGS=-I/usr/include PNG_LIBS=-L/usr/lib64 -lpng16 ICU_CFLAGS=-fPIC ICU_LIBS=-L/usr/lib64 -licuio -licui18n -licuuc -licudata ONIG_CFLAGS=-I/usr/include ONIG_LIBS=-L/usr/lib64 -lonig LIBSODIUM_CFLAGS=-fPIC LIBSODIUM_LIBS=-L/usr/local/lib64 -lsodium ARGON2_CFLAGS=-I/usr/local/include ARGON2_LIBS=-L/usr/local/lib64 -largon2 LIBZIP_CFLAGS=-fPIC LIBZIP_LIBS=-L/usr/local/lib64 -lzip] --version [8.1.27] --vernum [80127] Have you tried with these 2 disabled Code (Text): NGX_LDMOLD='y' PHP_LDMOLD='y'
I should add I have another centmin install on centos 7.9 with php 8.0 which also doesn't work (except I get the PHP Startup: Unable to load dynamic library 'swoole.so' error now) but that's a separate issue. Anyway, this one was a fresh Alma 8 install (from a few months back). I commented out those two lines and no joy unfortunately, still no sign of the extension.
In that case would need to inspect the full PHP upgrade/compile log from centmin.sh menu option 5 run https://community.centminmod.com/threads/how-to-troubleshoot-php-installs-upgrades.17857/
Nothing in your provided PHP upgrade log shows up as problematic though --with-swoole not supported suggests that PHP Swoole extension wasn't compiled. I think it's because you recompiled same PHP major branch version on centmin.sh menu option 5. If your pre-existing PHP version is 8.1 branch and you ran centmin.sh menu option 5 and set PHP 8.1.27 as recompile version, the Centmin Mod will skip the PHP extension compiling routines to save time as using same PHP branch 8.1 doesn't really require PHP extensions to be recompiled. You can force recompile by setting in persistent config file /etc/centminmod/custom_config.inc the variable below Code (Text): AUTODETECPHP_OVERRIDE='y' or if you recompile to a different PHP branch i.e. PHP 8.0 or 8.2 that would also trigger PHP extension routines. I guess I'd need to figure out how to check for new PHP extensions enabled for existing PHP major branch versions to also trigger PHP extension routines.
Thanks. I did both cmupdate and put the AUTODETECPHP_OVERRIDE='y' and swoole is now getting bundled in. Thanks for the swift help.
I just did an update from 8.2 branch to 8.3 and seeing a similar issue as before @eva2000 . Swoole.so not getting included and yes I've set AUTODETECPHP_OVERRIDE='y' Using 1.40 beta 1. My custom_config is below for reference: Code: CENTOS_ALPHATEST='y' NGINX_VERSION='1.25.0' NGINX_ONETWOTHREE_COMPAT='y' DEVTOOLSETTEN='n' DEVTOOLSETELEVEN='n' DEVTOOLSETTWELVE='y' SELFSIGNEDSSL_ECDSA='y' PHPFINFO='y' PYTHON_INSTALL_ALTERNATIVES='y' PHP_PGO='y' PHP_PGO_ALWAYS='y' PHPPGO_INDEXPATH='/home/nginx/domains/somesite.com/public/index.php' MARCH_TARGETNATIVE='n' DMOTD_PHPCHECK='y' NGINX_GEOIPTWOLITE='y' NGXDYNAMIC_GEOIPTWOLITE='y' NGINX_HPACK='y' NGINX_DYNAMICTLS='y' NGINX_PCRE_TWO='y' OPENSSL_VERSION='3.1.0' OPENSSL_VERSIONFALLBACK='3.1.0' OPENSSL_VERSION_OLDOVERRIDE='3.1.0' NGX_LDMOLD='y' PHP_LDMOLD='y' NGINX_NJS='y' NGXDYNAMIC_NJS='y' NGXDYNAMIC_BROTLI='y' NGINX_LIBBROTLI='y' NGINX_VIDEO='y' ENABLE_MARIADBTENFOURUPGRADE='y' ENABLE_MARIADBTENFIVEUPGRADE='y' ENABLE_MARIADBTENSIXUPGRADE='y' PHPSWOOLE='y' AUTODETECPHP_OVERRIDE='y'
Thanks for the bug report. Updated 131.00stable and 140.00beta01 with fix. PHP swoole extension routine usually installs swoole PHP extension + swoole async client PHP extension. But seems swoole async client repo is no more https://github.com/swoole/ext-async so removed it from Centmin Mod PHP-FPM routine and just install PHP swoole extension itself
Thanks @eva2000 I just did a cmupdate then option 5 and reinstalled 8.3.15 but still receiving the below... Should I do something different here to include it? Code: PHP Warning: PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/swoole.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 8.3.15 (cli) (built: Jan 11 2025 13:01:59) PGO (NTS) Copyright (c) The PHP Group Zend Engine v4.3.15, Copyright (c) Zend Technologies with Zend OPcache v8.3.15, Copyright (c), by Zend Technologies
that with AUTODETECPHP_OVERRIDE='y' set? if so would need php-fpm upgrade logs https://community.centminmod.com/threads/how-to-troubleshoot-php-installs-upgrades.17857/
Yes with the above UTODETECPHP_OVERRIDE='y' as per my custom config above. I'll direct msg you the the php minimal install log
I see the issue, PHP swoole dependency for libbrotli is missing as seems PHP swoole routine comes before libbrotli Code (Text): [1;32;40m* Installing swoole PHP extension (B[m************************************************* Downloading swoole PHP extension... [1;33;40mCheck if swoole-5.1.4.tgz exists (B[m[1;32;40mCompiling PHP swoole 5.1.4 PHP extension... (B[m/svr-setup cd /svr-setup make: *** No rule to make target 'clean'. Stop. Configuring for: PHP Api Version: 20230831 Zend Module Api No: 20230831 Zend Extension Api No: 420230831 Configuring for: PHP Api Version: 20230831 Zend Module Api No: 20230831 Zend Extension Api No: 420230831 configure: WARNING: unrecognized options: --enable-swoole-json configure: error: Package requirements (libbrotlienc) were not met: Package 'libbrotlienc', required by 'virtual:world', not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables BROTLIENC_CFLAGS and BROTLIENC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target 'install'. Stop. This is what I get on AlmaLinux 9 with PHP 8.3.15 and PHP swoole latest updated routine for PHP swoole 6.0.0 Code (Text): php --ri swoole swoole Swoole => enabled Author => Swoole Team <team@swoole.com> Version => 6.0.0 Built => Jan 11 2025 23:00:24 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 3.2.2 4 Jun 2024 dtls => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.2.11 brotli => E16777225/D16777225 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled mysqlnd => enabled Directive => Local Value => Master Value swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608 brotli-devel YUM package is installed by default as part of dependencies for Centmin Mod installed packages on EL8/EL9. Code (Text): yum provides /usr/lib64/libbrotlienc.so -q brotli-devel-1.0.9-6.el9.x86_64 : Lossless compression algorithm (development files) Repo : appstream Matched from: Filename : /usr/lib64/libbrotlienc.so brotli-devel-1.0.9-7.el9_5.x86_64 : Lossless compression algorithm (development files) Repo : @System Matched from: Filename : /usr/lib64/libbrotlienc.so brotli-devel-1.0.9-7.el9_5.x86_64 : Lossless compression algorithm (development files) Repo : appstream Matched from: Filename : /usr/lib64/libbrotlienc.so What is output for this command, to see if brotli-devel was removed after Centmin Mod installation Code (Text): yum -q history brotli-devel I'll update PHP swoole extension routine to double check brotli-devel is installed as well
ok. Just updated 140.00beta01 with fix and check for brotli-devel for optional PHP swoole extension routine. Run cmupdate to update 140.00beta01 and try centmin.sh menu option 5 again
In progress..... BTW, since a few months back I noticed that php upgrades are asking for github login.... I didn't really follow up and I may have skipped login a few times. Is there any significance to this? Just curious.
that was due to async swoole client extension not existing anymore https://community.centminmod.com/th...ing-during-php-8-1-rebuild.24791/#post-102826 excellente!