Christophe CasalegnoAutoimmune warrior, Entrepreneur & Bio/Hacker

brain@127.0.0.1:~$ cat post.html

StackX PHP on Debian 9, 10 and 11 – a forgotten session and one cursor too many

By Christophe Casalegno on in sysadmin / network / Linux

Hi friends! In my last post about the StackX repositories, we were at r26. Since then, the PHP team has published several fixes that I’ve backported and tested for the StackX PHP branches on Debian 9, 10 and 11. Two of those bugs had almost opposite effects. In one case, PHP would forget a session we’d just created. In the other, it would hang on to a database cursor the application no longer needed!

First up was r27. When msg_receive() received an incomplete SysV message, PHP could read one byte too many while unserializing it. Then came r28 and that disappearing session. Your application starts a session and hasn’t written anything to it yet. With session.lazy_write enabled, PHP could ask the session handler to update the timestamp on a record it hadn’t even created. On the next request, if you’re in strict mode, you’ve got yourself a new session ID! I backported the fix to 29 PHP/Debian combinations, including the pilots. The SysV and session fixes

With r29, it’s native ODBC’s turn. When the application drops its last reference to a result, PHP now releases the cursor that goes with it. If you use PDO_ODBC, this fix doesn’t affect you. I also backported a fix for the OPcache JIT, which could crash on certain calls involving property hooks. In the main repository, that changes just two branches, PHP 8.4 and 8.5 on Debian 11 Bullseye. The Bullseye packages and the r29 tests

And if you’re testing your application with PHP 8.4.27 on Debian 9 Stretch or 10 Buster? Both pilots got the same fixes. If APT only offers you PHP 8.4 packages and your other branches are up to date, that’s what you should see. We checked again that PHP 8.1 and 8.4 still run side by side. You still choose which PHP-FPM socket each site uses. Package versions in the experimental channel

Have a great weekend!

--
Christophe Casalegno
all.bo

Leave a comment

Add a comment
Christophe Casalegno Brain 0verride

Keep it simple
and direct!