DEV Community

sunah kim
sunah kim

Posted on Originally published at zenn.dev

Runtime EOL Is Scarier Than OS EOL — Our PHP 8.2 Server Has No Exit Path

What actually happened

Back in October, when the unauthenticated PHP RCE dropped, our production server was running Amazon Linux 2 (AL2). AL2 had already hit EOL in June 2026, so I was nervous — but to my surprise, the fixed PHP 8.2.35 arrived the same day via amazon-linux-extras. "So runtime patches still come even on an EOL OS," I thought, and honestly felt a bit relieved.

That relief lasted less than a week. While auditing support timelines, I froze:

  • PHP 8.2 security support ends 2026-12-31
  • AL2's extras channel has no PHP 8.3 at all
  • The Remi repository, the usual fallback, is frozen at 8.3.8 for the RHEL7 generation (which AL2 belongs to)

In other words: if a PHP vulnerability is published in January or later, there is no way to patch this server. The moment the next RCE lands, the options collapse to "take the site down" or "accept the breach." October's incident response turned out to be a rehearsal for exactly this — we just didn't know it yet.

The cause — patchability is governed by three dates

Looking back, I was anchored on the phrase "OS EOL" and watching the wrong date. OS EOL is about the kernel and OpenSSL, which feels abstract from a web app's perspective. What actually strangles you is any one of these three running out first:

Date to watch Our value Status
OS EOL AL2: 2026-06 Past (kept alive via extras)
Runtime EOL PHP 8.2: 2026-12-31 1 month left
Top version in the package channel extras: no 8.3 / Remi: frozen at 8.3.8 Dead end

When runtime EOL coincides with "no higher version available," yum update solves nothing. The nasty part is that the update command keeps succeeding while the server quietly stops being safe.

The fix — three options, only one removes the problem

The options we laid out:

  • A: Stay put (only bump libraries) — defenseless against any PHP vulnerability from January on. Pure deferral.
  • B: Build a new instance next door (AL2023 + PHP 8.3, supported until 2027-12) — the problem itself disappears.
  • C: Run PHP in Docker on the old OS — PHP becomes updatable, but it still runs on an EOL kernel.

Only B eliminates the "no patch exists" state. The cost is roughly 3–4 weeks of running two instances in parallel. Not cheap, but compared to being checkmated on the day of the next RCE, the decision was quick.

Designing a near-zero-downtime cutover

The scary part of a migration is cutover downtime. Here's the design:

1. Build and verify the new instance (AL2023 + PHP 8.3) alongside production
2. Maintenance page ON
3. Final sync: html/upload, .env, /etc/letsencrypt, var/sessions
4. Move the static IP from old to new (no DNS change; a few seconds to 1 min of interruption)
5. Verify on the new environment → maintenance page OFF
Enter fullscreen mode Exit fullscreen mode

The key is not touching DNS. Reassigning the static IP means no propagation wait, so the interruption is seconds to a minute. We sync session files too, so logged-in users mostly survive the move. The database is managed, so it stays where it is.

The main expected effort isn't PHP itself — it's Apache. AL2023's httpd assumes php-fpm, so leftover mod_php-era php_value lines in .htaccess files return 500 as-is. The plan is to sweep every .htaccess in the staging environment beforehand.

Takeaways

  • The combination of runtime EOL + no higher version in your channel causes real damage faster than "OS EOL" does. An update command succeeding and a patch existing are two different things.
  • Manage patchability as dates: (1) OS EOL, (2) runtime EOL, (3) the top version your package channel offers. The day any one of them runs out is your deadline.
  • "Build the new environment next door and swap only the static IP" was the most straightforward balance of downtime vs. risk.

To the question "nothing is broken right now, why migrate?" you should be able to answer with one sentence: "After December 31, patches for the next vulnerability will not exist." Whether you can say that sentence is what separates a planned migration from an emergency response.

Top comments (0)