Discover Centmin Mod today
Register Now

PHP 8.3.31 wont compile on CentOs 7

Discussion in 'Install & Upgrades or Pre-Install Questions' started by GASTAN, May 17, 2026.

  1. GASTAN

    GASTAN Member

    111
    12
    18
    Jun 28, 2017
    Ratings:
    +19
    Local Time:
    2:18 AM
    I am trying to upgrade PHP from 8.3.30 to 8.3.31 on CentOS 7 with CentminMod 132.
    I get this error:

    PHPMUVER = 8.3
    PHP_PGO = n
    make -j4
    /svr-setup/php-8.3.31/ext/openssl/xp_ssl.c: In function <E2><80><98>php_openssl_matches_san_list<E2><80><99>:
    /svr-setup/php-8.3.31/ext/openssl/xp_ssl.c:502:45: error: subscripted value is neither array nor pointer nor vector
    502 | ASN1_STRING_get0_data(san->d.iPAddress)[0],


    any idea what could be the problem ?
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    10:18 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  3. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    10:18 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Ok figured out the CentOS 7 specific OpenSSL 1.0.2 issue with newer PHP versions and updated with a patch fix in 132.00stable, 140.00beta01, 141.00beta01. Just need to run cmupdate before retrying centmin.sh menu option 5. Issue is on PHP 8.2.31, 8.3.31 and next PHP 8.4/8.5 releases.

    PHP 8.3.31 (and 8.2.31, plus all 8.2/8.3/8.4/8.5 branch HEADs) backported upstream commit 19255f4b78 which switched ext/openssl/xp_ssl.c's SAN IP address handling to OpenSSL 1.1.0+'s ASN1_STRING_get0_data() accessor - but CentOS 7 ships OpenSSL 1.0.2k which doesn't declare that function. So the compiler treats its return type as implicit int and chokes on int[0] subscripting.

    Centmin Mod fixes this on EL7 only with a new patch patches/php/php82-openssl102-xp_ssl-asn1.patch that inserts a 12-line static compat shim into xp_ssl.c (mirroring PHP's own openssl.c shim) returning M_ASN1_STRING_data(asn1), gated by #if PHP_OPENSSL_API_VERSION < 0x10100, applied via a content-detected EL7-only block in inc/php_patch.inc that auto-handles current and future affected PHP point releases and skips cleanly once upstream lands a real fix.

    Plain English: Newer PHP versions (8.3.31 and 8.2.31 and next PHP 8.4/8.5 releases) started using a modern OpenSSL helper function to read IP addresses out of SSL certificates — but CentOS 7's OpenSSL is too old to have that helper, so the compiler doesn't recognize the function, guesses wrong about what it returns, and gives up with a confusing error when PHP tries to grab the first byte of the address. Centmin Mod fixes this on CentOS 7 only by slipping in a tiny 12-line "translator" snippet at the top of the affected PHP file that teaches old OpenSSL how to do the new thing, and a smart detector in the upgrade script that automatically applies the fix when needed and quietly stays out of the way otherwise.
     
  4. GASTAN

    GASTAN Member

    111
    12
    18
    Jun 28, 2017
    Ratings:
    +19
    Local Time:
    2:18 AM
    Thx, it compiled now.
    But I still get php-fpm crashes ;(
     
  5. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    10:18 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+