Skip to content

Installing the PHP 8.3.36 security patch by hand (reference procedure)

Reference procedure, step by step, without the wrapper script. The short admin instructions are in patch.ol9.to.php.8.3.36.install.md. This document covers the package patch.ol9.to.php.8.3.36.tar.gz, which carries the patch script, its technical notes and the WCS handprint tool. Every step below was performed on a WCS DCA test appliance (Oracle Linux 9.6, PHP 8.3.22 from the Remi php:remi-8.3 stream) on 2026-10-23; the outputs shown are from that run.

1. What the patch does

  • Upgrades the appliance's system PHP 8.3 packages in place to PHP 8.3.36 (or a newer 8.3 release), which fixes CVE-2026-109618 and CVE-2026-109619 (PHP security release of 2026-10-21).
  • Keeps the existing PHP stream, php.ini, php.d and PHP-FPM settings. Only the packages built from the PHP source (php, php-cli, php-common, php-fpm, php-gd, php-mbstring, php-mysqlnd, php-opcache, php-pdo, php-sodium, php-xml) are updated. PECL extensions such as php-pecl-redis6 are not touched and keep working.
  • Validates before it changes anything: package signatures, a consistent PHP build, and a DNF transaction test. In --apply mode it backs up the PHP configuration, stops Apache and PHP-FPM, installs, tests PHP and both service configurations, then starts the services and checks the front end.
  • Does not run a general OS update, switch module streams, disable signature checks, or roll anything back automatically.

Timing measured on the test appliance:

Step Duration Service impact
--check about 20 s none
--apply about 35 s Apache and PHP-FPM stopped for about 11 s; Caddy stays up and answers 502 for PHP requests meanwhile, agents retry

2. Before you start

Requirement How to confirm
A WCS DCA on Oracle Linux 9.x (the script checks for Oracle Linux 9.*; this run used 9.6) grep PRETTY_NAME /etc/os-release
PHP 8.3 installed from the system packages (Remi php:remi-8.3 stream), php-fpm running php -v shows 8.3.x; systemctl is-active php-fpm prints active
Root access on the appliance the root password for su -, or sudo rights for your login
Outbound HTTPS from the appliance to the enabled repositories (Remi, Oracle Linux, EPEL, Caddy). All enabled repositories must be reachable, not just Remi curl -sI https://rpms.remirepo.net/ \| head -1 prints HTTP/2 200
No internet access? use the offline bundle procedure in section 12 instead of the repository mode
A VM or appliance snapshot taken right before --apply your hypervisor or cloud console
A maintenance window of 10 minutes the actual interruption is about 11 s, the rest is checking
The package and its published handprint (section 3) from WCS

The package is not deployed by the normal DCA rsync deployment; it is copied and run by hand, appliance by appliance.

3. The package

patch.ol9.to.php.8.3.36.tar.gz (9,579 bytes) unpacks to /var/www/patches/php.8.3.36/ and contains:

File Purpose SHA-256
patch.ol9.to.php.8.3.36.sh the patch script 4296a6f7c0cb1a9921a9144e213967719e32254fe4b7ff0f53ba5f1ea5ea8198
patch.ol9.to.php.8.3.36.md technical notes: what the script checks, backs up, refuses and logs 69f633fb06de025148262295af960f9d9d187c372f4b1ebadc7c0408e7ef64fa
hand.sh WCS handprint tool (prints sha1, sha256, sha512, md5 and size of a file) 5e64f847819fdb2ae2194a1b776490b8f717c032dd6a169d3f85136b02d8612e

Published WCS handprint of the package itself:

 WCS Handprint(patch.ol9.to.php.8.3.36.tar.gz)
  sha1: 79cd03288eec05f1b838775ff1edf6de4de52072
sha256: 2ae62a8769d530918fdc0b9de399e520de1550e9c4402c1805b21b6a31882adb
sha512: a0752cab53980502d83c7243a92a822785424290b10a2df28abe6ec5200661ad0fcb5929d450f9923680d9088d16755591b4044e9bed45d76967e0e3511095ac
   md5: 2d2e18d7a6d2293122d5be28a2ea4ed5
 crc32: d5aa6f2c
  size: 9579

Do not use a package whose handprint differs from the one WCS published.

4. Copy the package to the appliance

From your workstation, to the appliance's administrative login (dca on the test appliance; use the non-root login your appliance provides) and replace <appliance> with the DCA's host name or IP address:

scp patch.ol9.to.php.8.3.36.tar.gz dca@<appliance>:/tmp/

Then log in:

ssh dca@<appliance>

5. Verify the download

sha256sum /tmp/patch.ol9.to.php.8.3.36.tar.gz

Expected:

2ae62a8769d530918fdc0b9de399e520de1550e9c4402c1805b21b6a31882adb  /tmp/patch.ol9.to.php.8.3.36.tar.gz

If the value differs, delete the file and obtain the package again. (sha1sum, sha512sum and md5sum can be compared with the other handprint lines in the same way.)

6. Become root

Everything from here on runs as root. Switch with the root password:

su -

If the dca login has sudo rights on your appliance, sudo -i works as well. The test appliance did not grant sudo, so these instructions use su -.

7. Unpack the package

List the contents first. Every path must start with ./var/www/patches/php.8.3.36/ and there must be exactly three files:

tar -tzvf /tmp/patch.ol9.to.php.8.3.36.tar.gz
-rwxr--r-- dca/dca         504 2024-10-10 11:50 ./var/www/patches/php.8.3.36/hand.sh
-rw-r--r-- dca/dca        9039 2026-10-22 00:20 ./var/www/patches/php.8.3.36/patch.ol9.to.php.8.3.36.md
-rwxr-xr-x dca/dca       18765 2026-10-22 00:20 ./var/www/patches/php.8.3.36/patch.ol9.to.php.8.3.36.sh

Unpack it into place and verify the script:

tar -xzf /tmp/patch.ol9.to.php.8.3.36.tar.gz -C /
cd /var/www/patches/php.8.3.36
sha256sum patch.ol9.to.php.8.3.36.sh

Expected:

4296a6f7c0cb1a9921a9144e213967719e32254fe4b7ff0f53ba5f1ea5ea8198  patch.ol9.to.php.8.3.36.sh

bash ./hand.sh patch.ol9.to.php.8.3.36.sh prints the full handprint of the script. Its crc32 line comes out empty with a "command not found" message on Oracle Linux, which has no crc32 tool; the other lines are valid.

/var/www/patches is outside both web document roots (Apache serves /var/www/html, Caddy serves /var/www/caddyHtml), so the unpacked files are not reachable over HTTP; a request for /patches/php.8.3.36/hand.sh answers 404.

8. Pre-flight checks

php -v | head -1
systemctl is-active php-fpm httpd caddy
curl -sI https://rpms.remirepo.net/ | head -1
df -h /var/tmp | tail -1

Expected: PHP 8.3.x below 8.3.36 (if it already shows 8.3.36 or newer, the appliance is patched; --check in the next step confirms it), active for php-fpm (Apache and Caddy are normally active too, but the script only requires PHP-FPM), HTTP/2 200 from Remi, and a few hundred MB free.

The script refuses to run when PHP-FPM is not active, when the running PHP-FPM master is not the on-disk /usr/sbin/php-fpm binary (a previous update without a restart), when side-by-side php83-* packages are installed, or when another copy of the script holds its lock. Resolve those first.

9. Check without changing anything

bash ./patch.ol9.to.php.8.3.36.sh --check

This downloads the update into a root-only audit directory, verifies the signatures and the PHP build, and runs DNF's transaction test. It changes no packages, no settings and no services. It takes about 20 seconds. Look for these lines (Apache's "module … already loaded, skipping" warnings in between are normal on the DCA):

[…] Mode: check; Oracle Linux 9.6; minimum PHP 8.3.36
[…] Audit files: /var/tmp/wcs-php-update.OIBKm8rJ (root-only; contains configuration when applying)
[…] Validated fixed, consistent PHP build. Staged RPM count: 11
[…] Staged packages:
[…] php  0:8.3.36-1.module_php.8.3.el9.remi.x86_64
[…] php-cli  0:8.3.36-1.module_php.8.3.el9.remi.x86_64
    … (one line per staged package)
Transaction check succeeded.
Transaction test succeeded.
[…] Check passed. No packages, PHP configuration, or services were changed.

Read the staged package list: every package must be the 8.3.36 (or newer 8.3) build, and the list should contain only php and php-* packages plus any dependency the log names explicitly with a NOTICE.

On an appliance that is already patched the check ends with:

[…] Staged packages: none (the installed PHP core build already meets the required version).
[…] Check passed. No packages, PHP configuration, or services were changed.

In that case stop here; there is nothing to apply (an --apply on a patched appliance would only restart PHP-FPM).

If the check fails, see section 11. Do not continue to --apply until a check passes.

10. Apply the patch

  1. Confirm the maintenance window with whoever depends on the DCA.
  2. Take a snapshot of the appliance (VM or cloud snapshot). The script backs up the PHP configuration but not the packages; the snapshot is the rollback.
  3. Run:
bash ./patch.ol9.to.php.8.3.36.sh --apply

What happens, in order (about 35 seconds in total):

  1. The same download and validation as --check.
  2. Configuration backup to the audit directory (config-before.tar).
  3. Apache is stopped, then PHP-FPM. From here PHP requests answer 502 through Caddy.
  4. The 11 packages are upgraded with DNF.
  5. PHP and the PHP-FPM and Apache configurations are tested while the services are still stopped.
  6. PHP-FPM is started and verified, then Apache (only if it was running before).
  7. The PHP-FPM socket is checked, and one request to http://127.0.0.1/ must answer 2xx or 3xx.

The run ends with:

[…] Starting PHP-FPM after successful update and configuration tests.
[…] Starting Apache after PHP-FPM is verified.
[…] FPM socket is ready: /run/php-fpm/www.sock
[…] Post-start HTTP check: http://127.0.0.1/ returned 302
[…] SUCCESS: PHP 8.3.36; FPM master PID 87044.
[…] Check the DCA login, agent lookup, exports, and uploads before ending maintenance.
[…] Review any .rpmnew/.rpmsave configuration files; audit and backup: /var/tmp/wcs-php-update.XXDPCRPp

The 302 is the DCA redirecting the unauthenticated request to its login page, which is the expected answer.

Verify

php -v | head -1
/usr/sbin/php-fpm -v | head -1
rpm -q php-common php-fpm php-pecl-redis6
systemctl is-active php-fpm httpd caddy
find /etc/php.ini /etc/php.d /etc/php-fpm.conf /etc/php-fpm.d -name '*.rpm*'
tail -5 /var/log/php-fpm/error.log

Expected:

PHP 8.3.36 (cli) (built: Oct 19 2026 14:00:34) (NTS gcc x86_64)
PHP 8.3.36 (fpm-fcgi) (built: Oct 19 2026 14:00:34)
php-common-8.3.36-1.module_php.8.3.el9.remi.x86_64
php-fpm-8.3.36-1.module_php.8.3.el9.remi.x86_64
php-pecl-redis6-6.2.0-1.el9.remi.8.3.x86_64
active
active
active

The find prints nothing when no .rpmnew or .rpmsave file was created (the test run created none). If it lists files, compare them with the live configuration before deciding whether to merge them; the live files are still the ones in use. The PHP-FPM log should end with ready to handle connections.

Then, in a browser, before ending the maintenance window:

  1. Log in to the DCA at its normal address.
  2. Open an endpoint or agent lookup.
  3. Run an export.
  4. Upload an avatar or certificate.

Keep the audit record and clean up

Each run leaves a root-only directory /var/tmp/wcs-php-update.XXXXXXXX (--check and --apply each create one). The --apply directory holds update.log, the package lists before and after, the signature results and config-before.tar, the backup of /etc/php.ini, /etc/php.d, /etc/php-fpm.conf and /etc/php-fpm.d. Oracle Linux cleans /var/tmp of files older than 30 days, so copy the directory somewhere durable if your change process requires it:

cp -a /var/tmp/wcs-php-update.* /root/

The directory contains the PHP configuration; keep it root-only. Remove the uploaded package; the unpacked files in /var/www/patches/php.8.3.36/ can stay as a record of what was run:

rm /tmp/patch.ol9.to.php.8.3.36.tar.gz
exit

11. If something goes wrong

The script stops at the first problem, prints ERROR: … or FAILED (exit n) with the audit directory, and exits with a non-zero status. Nothing is undone automatically.

Message Meaning What to do
Run with sudo or as root on the DCA. not running as root su - first (section 6)
Requires Oracle Linux 9; found … not an Oracle Linux 9 appliance this package is for Oracle Linux 9 DCAs only; contact WCS support for other platforms
Missing command: curl (or another command) a required tool is absent dnf install curl-minimal (Oracle Linux 9's curl-minimal is enough), then run again
Installed PHP is 8.x.y. This script preserves an existing PHP 8.3 installation. the appliance runs another PHP branch not covered by this patch; contact WCS support
Side-by-side PHP packages detected. … php83-* packages are installed not covered by this script; contact WCS support
php-fpm is not active; resolve the service configuration first. PHP-FPM is stopped systemctl start php-fpm, check systemctl status php-fpm, run --check again
Running FPM is a different/custom or previously replaced binary. Restart/verify it before using this script. an earlier package update was never followed by a PHP-FPM restart systemctl restart php-fpm, confirm it is active, run again
Another PHP patch script is running. a second copy holds the lock wait for it to finish, or find it with ps -ef \| grep patch.ol9
DNF errors such as Cannot download … or Failed to download metadata … an enabled repository is unreachable; the script requires every enabled repository, not only Remi fix the appliance's outbound access or proxy, or use the offline bundle (section 12)
php-common is PHP 8.3.x; need PHP 8.3.36 or newer within 8.3. Repositories may not have the fix yet. the repository does not offer the fixed build yet wait for Remi to publish it, or use an approved offline bundle (section 12); keep the appliance access-restricted meanwhile
Untrusted or damaged RPM: … Import approved vendor keys separately. a staged RPM is not signed by a key RPM already trusts obtain a correctly signed bundle; the script never imports keys
Staged … is neither a PHP core package nor an upgrade of an installed package; remove it from the bundle … the offline bundle contains an unrelated package remove it from the bundle directory and run again
FAILED (exit n) after Beginning maintenance. the install or a post-install test failed; Apache and PHP-FPM are left stopped on purpose read update.log in the audit directory and dnf history info last; fix and start the services by hand (systemctl start php-fpm httpd) or restore the snapshot. Do not reopen traffic until PHP-FPM and the DCA login work
FPM socket did not appear within 10 seconds … or HTTP check expected 2xx/3xx, received … the services were started but the front end did not answer both services may be running; check systemctl status php-fpm httpd caddy and /var/log/php-fpm/error.log, then the DCA in a browser
PHP extensions disappeared; see …/extensions-missing.txt an extension that was loaded before is missing after the update; services stay stopped read that file, then contact WCS support; the extension's package may need its own update

When asking WCS support for help, send the update.log from the audit directory and the output of php -v, rpm -qa 'php*' and dnf history list.

12. Appliances without internet access: offline bundle

The script can install from a directory of RPMs instead of the repositories. The bundle must contain the 8.3.36 (or newer 8.3) build of every PHP core package installed on the appliance, signed by Remi's key, which the appliance already trusts because its PHP came from Remi. Unrelated packages in the directory are rejected, and the script never imports keys or adds repositories.

On the appliance, list the packages the bundle must cover:

rpm -qa --qf '%{NAME} %{SOURCERPM}\n' | awk '$2 ~ /^php-8\.3\./ { print $1 }' | sort

On the test appliance that printed the 11 names listed in section 1. On an Oracle Linux 9 host with internet access and the same Remi stream enabled (for example another DCA, or a staging VM), download exactly those packages:

mkdir /root/php-8.3.36-rpms
dnf download --destdir /root/php-8.3.36-rpms php php-cli php-common php-fpm php-gd php-mbstring php-mysqlnd php-opcache php-pdo php-sodium php-xml

Copy the directory to the offline appliance (for example with scp -r to the dca login and then mv as root to /root/php-8.3.36-rpms), then run the same two steps with --rpm-dir:

bash ./patch.ol9.to.php.8.3.36.sh --check --rpm-dir /root/php-8.3.36-rpms
bash ./patch.ol9.to.php.8.3.36.sh --apply --rpm-dir /root/php-8.3.36-rpms

Offline runs disable all repositories, so a dependency that the new PHP build needs and that is not already installed has to be installed separately first; the check names it. For the 8.3.36 build no extra dependency was needed on the test appliance.

13. Several appliances at once (WCS operators)

Repeat sections 4 to 10 per appliance; --check can be run on all of them in advance. Operators with the repository checkout can also run the script through Ansible (the repository's ansible.cfg sets become = True):

ansible DCAs -i ansible/inventory/hosts.local -m script -a "deploy/patches/php.8.3.36/patch.ol9.to.php.8.3.36.sh --check" --limit <host>

Still take the snapshot and apply one appliance at a time behind the load balancer, so the others keep serving while one is in maintenance.

14. Reference: the validated run

Item Value
Date 2026-10-23
Appliance WCS DCA test VM, Oracle Linux Server 9.6, kernel 5.15.0-308 UEK, x86_64
PHP before 8.3.22-1.el9.remi (Remi php:remi-8.3 stream), PHP-FPM active since boot
PHP after 8.3.36-1.module_php.8.3.el9.remi, 11 packages upgraded, PECL redis6, igbinary and msgpack unchanged and loaded
--check 21 s, exit 0, nothing changed
--apply 33 s, exit 0, Apache and PHP-FPM stopped 15:54:36 to 15:54:47 UTC, HTTP check 302
Configuration files no .rpmnew or .rpmsave created
DNF history one Upgrade transaction of 11 packages
Second --check after the patch "Staged packages: none", exit 0

Technical details of the script's checks, backups and refusals are in patch.ol9.to.php.8.3.36.md beside the script.