When I first installed php 8, I used the instructions for Apache. Problem is, my server uses LiteSpeed. Oops!
I do see an option in LiteSpeed WebAdmin to update PHP through there, under Tools > Compile PHP. It only goes up to 8.1.1, but I can either make an edit to that or not worry about being on the cutting edge here.
So, now that I got that figured out… is this all I need to do? Besides making backups beforehand, of course.
“no acceptable C compiler found in $PATH” means exactly that: there’s no C-compiler in your exec-path to be found, so php won’t compile. So first install an acceptable c-compiler and all extra system c-libraries for php to build, then try again. Mind you: there will be some to install, so maybe your webadmin has an option to help you there too.
I used this command and rebooted the server. I’m still unable to compile php via OpenLiteSpeed’s GUI, however. In a few days I will go over all I have done and see where I have gone wrong.
php needs many more system libs to compile, but I suppose that is out of scope for this forum. While this is for older php and ubuntu, it gives you an idea:
Newer php/ubuntu might require different steps (I’m a fedora/redhat user, so can’t say exactly), but normally the build instructions are explained on the php site itself.
Next tp that, make sure you actually want this … compiling php just as-is will result in a different result than expected (you need php-fpm too) and by default not integrated with systemd.
So, maybe the best is to search for an ubuntu/debian repo that gives you updated php repositories and use those.