Learn about Centmin Mod LEMP Stack today
Register Now

PHP-FPM PHP8.3 Not Building Almalinux8

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Matt, Oct 8, 2024.

  1. Matt

    Matt Well-Known Member

    932
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    4:30 PM
    1.5.15
    MariaDB 10.2
    When building PHP8.3, it's failing with the below errors:


    Code:
    /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: symbol lookup error: /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: undefined symbol: zip_file_is_seekable
    Generating phar.php
    /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: symbol lookup error: /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: undefined symbol: zip_file_is_seekable
    make: [Makefile:498: ext/phar/phar.php] Error 127 (ignored)
    /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: symbol lookup error: /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: undefined symbol: zip_file_is_seekable
    Generating phar.phar
    /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: symbol lookup error: /svr-setup/php-8.3.11/fpm-build/sapi/cli/php: undefined symbol: zip_file_is_seekable
    Code:
    # rpm -qa | grep -i libzip
    libzip-1.7.3-8.el9.x86_64
    I can downgrade to 8.2 with no issues.
     
  2. Matt

    Matt Well-Known Member

    932
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    4:30 PM
    1.5.15
    MariaDB 10.2
    This was caused by ImunifyAV installing libzip, which appears to be conflicting with the libzip installed by centminmod. I removed the OS version that ImunifyAV installed, and PHP8.3 built correctly.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    What version of libzip did did it install ?
     
  4. Matt

    Matt Well-Known Member

    932
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    4:30 PM
    1.5.15
    MariaDB 10.2
    This one:

    # rpm -qa | grep -i libzip
    libzip-1.7.3-8.el9.x86_64
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I see. Centmin Mod for PHP 7.3+ installs libzip 1.10.1 IIRC, reason was CentOS 7 libzip was older, but for AlmaLinux/Rocky Linux EL8/EL9, maybe not needed and can go with system libzip. Will look into it :)

    Though seems 1.11.1 is latest now https://libzip.org/news/
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Ok did first private test on 140.00beta01 with PHP 8.3.12 using Remi's YUM repo for remi-libzip 1.11.1 package it installs outside of usual path at /opt/remi/libzip so PHP-FPM won't be impacted by other software's install of system default path libzip

    Code (Text):
    php -v
    PHP 8.3.12 (cli) (built: Oct 12 2024 14:00:23) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.3.12, Copyright (c) Zend Technologies
        with Zend OPcache v8.3.12, Copyright (c), by Zend Technologies
    

    Code (Text):
    php --ri zip
    
    zip
    
    Zip => enabled
    Zip version => 1.22.3
    Libzip version => 1.11.1
    BZIP2 compression => Yes
    XZ compression => Yes
    ZSTD compression => Yes
    AES-128 encryption => Yes
    AES-192 encryption => Yes
    AES-256 encryption => Yes
    

    Code (Text):
    ldd $(which php-fpm) | grep zip
            libzip.so.5 => /opt/remi/libzip/lib64/libzip.so.5 (0x00007f95b2e42000)
    

    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/lib64/../lib64 -L/opt/remi/libzip/lib64]
      --libs              [-lcrypt  -lc-client  -ltidy -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lbz2 -lrt -lm  -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lsqlite3 -lz -lcurl -lssl -lcrypto -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 -lm -lssl -lssl -lcrypto -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lexslt -lxslt -lxml2 -lzip -lz -lssl -lcrypto -lcrypt ]
      --extension-dir     [/usr/local/lib/php/extensions/no-debug-non-zts-20230831]
      --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-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-pic --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --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 LIBZIP_CFLAGS=-fPIC LIBZIP_LIBS=-L/opt/remi/libzip/lib64 -lzip]
      --version           [8.3.12]
      --vernum            [80312]
    

    where PHP-FPM using LIBZIP_LIBS=-L/opt/remi/libzip/lib64 -lzip to help guide PHP-FPM to using remi-libzip :)

    Will need to test PHP 7.4-8.4 for this on EL8/EL9 first
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  8. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    5:30 PM
    After last update(almalinux 9) i recompiled php version and now my Xenforo 2.3 forum isn't working, can i rollback centminmod version?
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  10. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    5:30 PM
    PHP_GO is disabled and compilations seems ok, but i get a 500 error or:

    Code:
    Fatal error: Uncaught Error: Attempted to recursively load configuration file in /home/nginx/domains/xxx.com/public/src/XF/App.php:261 Stack trace: #0 /home/nginx/domains/xxx.com/public/src/XF/Container.php(33): XF\App->XF\{closure}(Object(XF\Container)) #1 /home/nginx/domains/xxx.com/public/src/XF/App.php(760): XF\Container->offsetGet('...') #2 /home/nginx/domains/xxx.com/public/src/XF/Container.php(33): XF\App->XF\{closure}(Object(XF\Container)) #3 /home/nginx/domains/xxx.com/public/src/XF/App.php(2983): XF\Container->offsetGet('...') #4 /home/nginx/domains/xxx.com/public/src/XF/Error.php(91): XF\App->db() #5 /home/nginx/domains/xxx.com/public/src/XF/App.php(2837): XF\Error->logException(Object(Error), true, '') #6 /home/nginx/domains/xxx.com/public/src/XF.php(249): XF\App->logException(Object(Error), true) #7 [internal function]: XF::handleException(Object(Error)) #8 {main} thrown in /home/nginx/domains/xxx.com/public/src/XF/App.php on line 261
    this is my php update log: centminmod-log
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try downgrading to previous PHP version you used to see if it's PHP 8.3.12 specific issue
     
  12. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    5:30 PM
    Was same version, i downgraded to php 8.2.x too with no luck :/
     
  13. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Then it ain't php related maybe Xenforo config.

    Verify that file permissions for /home/nginx/domains/xxx.com/public/src/XF/App.php

    Try restarting Nginx and php-fpm
    Code (Text):
    nprestart


    This error typically occurs when there's a circular dependency in the configuration loading process. It's trying to load a configuration file that's already being loaded, creating an infinite loop.

    Review the code around line 261 in /home/nginx/domains/xxx.com/public/src/XF/App.php to identify what might be causing the recursive loading.

    Check your XenForo installation for any corrupted or incomplete files.
     
  14. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    5:30 PM
    I finally found the culprit, after reinstalling for nothing :D

    I have this in my Xenforo config:

    PHP:
    $config['auth'] = [
        
    'algo' => PASSWORD_ARGON2ID
    ];
    I think its releated with this libzip update, because i needed install:

    dnf install argon2 libargon2-devel
    and add some things in /etc/centminmod/custom_config.inc

    after that and php recompilation all its fine, but was hard to find :dead:
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Ah might be a bug there as Argon2 should be installed by Centmin Mod ! Will double check.
     
  16. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Should be fixed in latest 140.00beta01 update https://community.centminmod.com/threads/26602/. You can run cmupdate command and run centmin.sh menu option 5 to recompile PHP-FPM and then re-add Xenforo config.php argon2 config :D
     
  17. Rhodium

    Rhodium New Member

    25
    5
    3
    Jul 1, 2020
    Ratings:
    +9
    Local Time:
    5:30 PM
    Yep, its working fine now, thanks eva! ;)
     
  18. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    1:30 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Awesome thanks for bug report. Another one squashed :D