Guide · Server administrators running DirectAdmin
DirectAdmin
Contents
Prerequisites#
- Root SSH.
- A backup, and time for compiling: CustomBuild builds PHP from source.
1. Installed versions#
Read-only: changes nothing
# PHP versions configured in CustomBuild (php1_release, php2_release …)
grep -E '^php[0-9]_(release|mode)=' /usr/local/directadmin/custombuild/options.conf
# Actual version of each installed PHP
for b in /usr/local/php*/bin/php; do echo "$b: $($b -v | head -1)"; done
2. Refresh the version list and compare#
Read-only: changes nothing
cd /usr/local/directadmin/custombuild
./build update # refreshes CustomBuild and the list of available versions
./build versions # installed versus available versions
If the available version for each branch is 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later, go ahead. If not, CustomBuild does not have the fix yet. Check again later and, in the meantime, apply the temporary mitigations.
./build update changes the CustomBuild files, not the installed PHP.
3. Upgrade#
Changes packages or configuration: back up and test first
cd /usr/local/directadmin/custombuild
./build php
The PHP build usually restarts the relevant services; confirm this in step 4. On newer installations the same function is also available as da build php.
4. Restart and verify#
Restart: possible brief service interruption
# PHP-FPM service names (e.g. php-fpm84) and restart
systemctl list-units --type=service | grep -E 'php-fpm[0-9]+'
systemctl restart php-fpm84
Read-only: changes nothing
/usr/local/php84/bin/php -v
for p in $(pgrep -f 'php-fpm|lsphp|httpd'); do ls -l /proc/$p/exe 2>/dev/null; done | grep deleted
For unsupported versions (8.1 and older), CustomBuild cannot pull an upstream fix, because none exists. You need to upgrade to a supported branch or use a vendor offering extended support.
Main source: DirectAdmin community forum · PHP project