Roberts Blog

Don’t let a good crisis go to waste: PHP2Shell

The Bug
Last Wednesday morning (October 21), a serious vulnerability was discovered in PHP that would be fixed later that afternoon in PHP 8.3+.
Since a proof-of-concept was known, the recommendation was to shut down PHP servers. So I shut down my web server.
I didn't have time to look into this during the day.

Analysis
Wednesday evening, I took a quick look at the versions of the software running on my web server. Much of it hadn’t been upgraded in a long time: Linux, the web server, the database, and PHP.
The existing PHP source code wouldn’t run on version 8.5 or higher, so quite a bit of code still needed to be modified for that.
I’d been wanting to switch hosting providers for a while. After about 20 years with Versio (formerly PCextreme), their prices had risen sharply, while the competition had become much cheaper.
This seemed like the right time, but it would mean the website would be offline until I was done with the new server.

AI to the rescue
Fortunately, we have AI these days. Both updating the PHP code and setting up a new web server are a lot easier.
To update PHP, I set up a feedback loop so that AI can check on its own whether everything continues to work while the code is being updated. That was already done by Wednesday evening: impressive.
For setting up the new server, I wanted to have a better understanding of exactly what was being installed and configured, so I did that using AI’s instructions. I’m impressed by how thorough the plan was and the steps to verify that everything was working properly. The configuration details were really excellent, much better than I could have done myself. I’m convinced that the new server is even more secure. All automated tasks, all backups, everything is up and running again.

Live
As of yesterday evening, October 25, the new server is online, so far, I haven't found anything that isn't working. We're all set for the coming years.