7x Exponential Network Learn Upgrade traps
← How upgrades work

Upgrade traps

// updated · xne 0.3.0.8

Each trap cost a failed upgrade done by hand. xne now detects every one of them.

Each trap below cost a failed attempt in an upgrade run by hand before xne existed. Each is now a detector in classes/Xne/Client/Traps.php, shown by xne traps and in every plan. Levels:

LevelEffect
infoshown; nothing to do, or xne handles it
warnshown; the upgrade runs, and you act afterwards as the fix says
blockthe upgrade is refused (exit 3) until it is fixed, or accepted with --accept=<id> by the person responsible
IdLevelDetectsWhy it mattersFix
public-lib-copyblocka folder lib/ with a version.php one or two levels above the install (for example the account's public_html/lib) that is not the install's ownPHP resolves the kernel's relative lib/... includes from the document root: a stale copy there is loaded instead of the upgraded lib/, and the site runs half old, half newreplace the copy with a link to <root>/lib (keep the copy aside), or accept it when it belongs to another install
composer-files-entryblockan entry of vendor/composer/autoload_files.php that resolves outside the installevery tree sharing that vendor/ loads the other tree's autoload.php/config.php: a kept old tree or a sandbox runs the live coderegenerate the autoloader inside the install (composer dump-autoload) so the entry is the install's own
shared-extension-folderinfo / blockextension folders (or extension/ itself) that link out of the install, shared with another clonewriting there changes the other clone too, which may still run the old kernelgive the install its own copy, or choose: --shared=skip (leave them) or --shared=write (change them for every clone). Blocked only when the upgrade would write there
litespeed-htaccess-phpinfo / blockan `AddHandler application/x-httpd-(ea-phplsphpalt-php)NN line in the install's or the docroot's .htaccess`LiteSpeed (and cPanel EA) take the PHP version from that line, not from the panel; a version below the target's minimum breaks the site after the upgradeswitch the line (and the panel) to a supported PHP; after the upgrade restart the PHP workers (pkill -x -u <owner> lsphp, a graceful LiteSpeed restart keeps detached workers). Blocked only when the PHP is too old for the target
clear-id-one-at-a-timeinfoalwaysezcache.php --clear-id=a,b ignores a comma listbuilt in: the finish step calls ezcache.php --clear-tag=<tag> once per tag
valkey-view-cachewarnthe sevenx_valkey_cache extension, activeit keeps the content view cache and the INI cache in Valkey; ezcache.php leaves those keys, so old pages and old settings stayafter the upgrade flush the keys of the install's InstallationHash through the extension, then reload PHP
installation-hashinfo / warnInstallationHash of sevenx_valkey_cache (in the extension's own settings/valkeycache.ini.append.php) is auto or emptyauto builds the hash from path and host: a tree swapped in by a rename reads the old tree's INI cachefix the hash in that file (a word per site)
kernel-overrideswarn / blockclass entries in var/autoload/ezp_override.php; block when EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE is on in config.phpthe autoload generator maps kernel-class copies from every extension folder, active or not; an old copy of a kernel class breaks the upgraded sitecheck each copy against the target kernel; remove or exclude stale ones (.autoloadignore); accept when they are current
live-manifestinfoalwaysshare/filelist.md5 must describe the files, or Setup > Upgrade check lists hundreds of "modified" filesbuilt in: the target's own manifest lands with the upgrade, and the health check compares it with the files
database-implementationblockDatabaseImplementation of the install is not an ImplementationAlias of the target kernel's settings/site.ini (for example ezsqlite3 where the kernel knows sqlite3)the kernel falls back to a null database: the site and every kernel upgrade step lose the databaseset DatabaseImplementation in settings/override/site.ini.append.php to one of the listed names
several-databasesblockmore than one distinct database across the siteaccessesphase 1 backs up and upgrades one database per installupgrade with the kernel's exp:upgrade by hand, or wait for phase 3
unsupported-databaseblocka database engine xne has no driver for, or a database the install's settings cannot reachnothing can be backed upcheck [DatabaseSettings], and that xne's PHP has the driver (pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb, oci8; --php names another PHP)

Adding a trap

  1. A detector in Traps::run(): an id, a level, the message (what was found, why it matters) and the fix.
  2. If it can be fixed safely as part of an upgrade, a fix step in Plan/Apply instead of a block.
  3. A test in tests/php/ that builds the situation and checks the level and the refusal (exit 3).
  4. A row in this table, and the id in Traps::IDS.