Want more timely Centmin Mod News Updates?
Become a Member

Beta Branch add fail-fast PHP source tarball validation to install path in 140.00…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Aug 16, 2026 at 8:44 AM.

  1. eva2000

    eva2000 Administrator Staff Member

    59,515
    12,539
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,180
    Local Time:
    6:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    add fail-fast PHP source tarball validation to install path in 140.00beta01

    PHP source downloads could silently save HTTP 200 text/html soft-404
    pages or truncated tarballs, then continue into a multi-thousand-line
    compile cascade with no PHP installed at the end. Every abort path was
    either commented out or swallowed by tee pipeline subshells.

    Changes:
    - inc/downloads.inc: new cmm_php_fatal/cmm_php_fatal_clear/
    cmm_php_fatal_pending sentinel helpers, cmm_archive_valid (size floor
    + tar -tf integrity check) and cmm_php_mirror_list (ordered dedup'd
    mirror list with PHP_EXTRA_MIRRORS support)
    - inc/downloads.inc: phpsrc_preflight() probes mirrors (HEAD with
    ranged-GET fallback, content-type soft-404 detection) before
    yuminstall so a download failure aborts with the server untouched
    - inc/downloads.inc: phptarball() rewritten - atomic .cmmpart download
    validated before promotion, ordered mirror fallback loop, extraction
    verified via tar exit status and main/php_version.h presence
    - inc/downloads.inc: DOWNLOADAPP_PHP hardened with -fL --retry 3 and
    connect/max timeouts
    - centmin.sh / centmin-cli.sh: new PHP_SRC_FAILFAST,
    PHP_TARBALL_MINBYTES, PHPGEOIP_MAXVERNUM, PHP_EXTRA_MIRRORS defaults;
    sentinel clear at every install/upgrade entry point; post-download and
    post-install abort gates with re-run guidance banners; guarded cd into
    the PHP source tree before the compile phase
    - inc/php_upgrade.inc: menu option 5 download block rewritten with the
    same validated atomic mirror loop; sentinel-aware cd at the compile
    boundary; abort check after phpng_download
    - inc/phpng_download.inc: 8 bare status-0 exits replaced with sentinel
    aborts, tarball integrity validation before every extraction, git
    clone guarded, PHPNG_YES set consistently on all five branches
    - example/custom_config.inc: document the four new variables

    Continue reading...


    140.00beta01 branch