So we had a long conversation wtih Adam trough tickets. We found the problem.
It is indeed a problem in how the ECP php package were compiled.
The problem is that (in this case, but may apply to anything else too) the PHP version are compiled based on which Ubuntu version you are on. So php72 in Noble is compiled on Noble, in Jammy on Jammy, and so on.
But older PHP like 7.2 had to be compiled with old GCC, otherwise compiler bug appears, probably because of new compiler code which didn't exists at that time. In this case the new gcc causes this bug in php 7.2 opcache.
The solutions (pick one):
1) The easiest way: install Ubuntu 22.04 and use the Jammy repo for ECP if you host older websites.
2) The harder way if you want to stick to 24.04:
- Add the Jammy ECP repo to your apt sources.list:
deb [arch=amd64, signed-by=/usr/share/keyrings/enhance.gpg] https://apt.enhance.com jammy main
- Add a pin to avoid the package to be upgrade in the future (at least till the 24.04 version is fixed): create a new file /etc/apt/preferences.d/ecp-php72 and add inside this:
Package: ecp-php72
Pin: release o=Enhance, n=jammy
Pin-Priority: 1001
Package: *
Pin: release o=Enhance, n=jammy
Pin-Priority: -10
then save.
- Run apt update and upgrade, it will ask to downgrande the ecp-php72 package. Confirm.
- Wget the following missing libraries and install them with dpkg -i in the following order:
http://launchpadlibrarian.net/790503544/libldap-2.5-0_2.5.19+dfsg-0ubuntu0.22.04.1_amd64.deb
http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb
http://launchpadlibrarian.net/820811009/libtiff5_4.3.0-6ubuntu0.12_amd64.deb
http://launchpadlibrarian.net/740689248/libmagickcore-6.q16-6_6.9.11.60+dfsg-1.3ubuntu0.22.04.5_amd64.deb
http://launchpadlibrarian.net/740689251/libmagickwand-6.q16-6_6.9.11.60+dfsg-1.3ubuntu0.22.04.5_amd64.deb
- Restart PHP
Anyway, the problem was solved.
Now Adam will look into recompiling old ECP PHP packages on Noble with the old compilers, to avoid this problem. But will probably take some time till we can see them in the repos.
I want to make a big THANK YOU to Adam for the time spent together to reproduce, confirm and fix this problem, which is kinda hidden and not easy to spot, unless you have a very specific PHP code. The debug took some time.
I've never encountered such skilled support in similar occasions, usually you get into a wall of level1/2/3 support and waste a week to get a response which doesn't sound like an AI. And when you get it they didn't even read your question correctly.
With Adam, instead, it was a pleasure to track down this problem. He immediately understood the problem and even proposed to write a patched code to the PHP source if we were to found the bug was there. Really a pleasure to talk with competent people, real sysadmin and coders, that get what you are talking about instantly. This is what makes this project very special.