Title: How to run PHP 5.6 alongside KeyHelp 26.2 on Debian 13? (legacy script, no Docker)

Discussions about the usage of KeyHelp.
Post Reply
Chalipa
Posts: 36
Joined: Sun 19. Mar 2023, 04:03

Title: How to run PHP 5.6 alongside KeyHelp 26.2 on Debian 13? (legacy script, no Docker)

Post by Chalipa »

Hi everyone,

I’m running KeyHelp 26.2 (Build 3756) on a VPS with Debian 13.7 (64-bit) and Apache 2.4.69.

I have a legacy script that only works with PHP 5.6 and doesn’t run on newer versions.

Under Configuration → PHP Interpreters, I only get these versions:

8.5.12
8.4.27
8.3.36
8.2.35
8.1.34
8.0.30

There is no option to install 5.6 (or 7.x).

What I understand so far

PHP 5.6 is end-of-life and unpatched, so I know the risks. It’s for a single site and I’m willing to restrict it (open_basedir etc.).
Debian 13 has no 5.6 packages, and OpenSSL 3 makes a normal build difficult.

I don’t want to use Docker.


My current plan

Compile a minimal PHP 5.6.40 into /opt/php56, run it as its own PHP-FPM pool/socket under a systemd service, and point the one domain at it using custom directives in KeyHelp (SetHandler "proxy:unix:/run/php56-fpm.sock|fcgi://localhost").

My questions

Is there an official or recommended way in KeyHelp to add an older PHP interpreter (5.6 or 7.x) that isn’t in the list, for example by dropping in a self-compiled one?

If not, is my approach (separate FPM socket plus custom directive on a single domain) safe with KeyHelp, or could KeyHelp updates or config rebuilds overwrite or conflict with it?

Is there a better place to hook in a custom FPM socket per domain (custom directives, a custom PHP-FPM pool template, etc.)?
Has anyone already done this on Debian 12/13 and can share the working configure flags?

Thanks in advance for any advice.
Post Reply