dbha1001
I had this happen too then did some research and found the following on the official Joomla site.
- J3.10.X is only recommended for use with php 7.4.x - i.e. there is no guarantee it will work with a higher version of php.
- Therefore to update the php you first need to update the Joomla from 3.10.x to J4.x.
- Before trying to update from J.3.10.X (to J4) you need to go into the back end of your Joomla site and change the Update Channel in Update Sites for Core Joomla updates from Default to Joomla Next (and save/close), which should generate a 2 part list. Part A shows all the extensions on your system that are incompatible with Joomla 4 & Part B shows all the things that are compatible. I was amazed that Part A was longer than Part B because I always kept my sites up to date.
You need to fix Part A ( uninstall or find/install replacements) before you can upgrade to Joomla 4 & php 8.X.
I (using Akeeba) backed up the site & effectively made a clone on another server (Winamp etc or if possible, another hosted location) and did all the changes on that clone & when the Core Joomla Update Next function gave me green tick marks everywhere, then I updated the site to Joomla 4 and AFTER that I updated the php to 8.0.x (not 8.1).
Note one of the major changes you may have to do is to the template the site runs on. Joomla 3.10.x software construction is pretty much totally different to Joomla 4.x construction, so your old template will not work, or will crash you site (did for me). Therefore I had J3 Framework/template on the J3.10.X site & changed the clone site to J4 Framework & template.
Once I was happy with the clone, I went back to the "live" site, made a full backup & downloaded the files from the server - deleted everything from the server then used Akeeba Kickstart Pro files to install the backup of the "clone", so on the "live" site I ended up with J4.2.2 running on php 3.10.x. A that point, I updated the "live" site php to 8.0.x (not 8.1).
I know its a lot of work, but its the only way I found to go from 3.10.x to J4 and from php 7.4.x to php8.0.x without totally screwing up the live site.
Why I say not php 8.1? There are even more changes needed to get that to work, so I went for the easiest option first.
So far I have changed 3 Joomla sites in this way. I have another 5 existing sites to do & a number of "new" projects waiting in the wings.
Hope this helps.