by Ken Task.
Settings in php look ok, but ...
So I understand ... uploading the .mbz backup to server is ok, file is there and you begin the restore process. Gets to a % and then the error. Right?
Are you stepping through the pages that shows/reviews what is to be restored? or skipping to the end using that button?
Suggest turning on debugging and try it again.
Share back here anything moodle might show you.
The error shared indicates there might issues with either the apache server or database server your moodle uses.
Was your site originally installed and running with http:// and you've recently turned on https://?
Did you run the httpsreplace tool found in
yoursite/admin/tool/httpsreplace/
'SoS', Ken