500 after upgrade: Uncaught ReflectionException: Class "view" does not exist

tried and failed to upgrade from 5.3.76 to latest 5.59. Now stuck with 500 :frowning: In the nginx logs it says
Uncaught ReflectionException: Class "view" does not exist in /var/www/mysitename/vendor/laravel/framework/src/Illuminate/Container/Container.php:875

I have tried running php artisan migrate, optimize, clear-compiled, mostly I get these errors:

In Container.php line 877:

  Target class [db.schema] does not exist.


In Container.php line 875:

  Class "db.schema" does not exist

I have tried deleting the bootstrap/cache folder.

Yes, I have php 8.1 installed, both fpm for nginx and default for cli/command line.

I am at a loss what to do next, I am really regretting clicking on that upgrade link. If anyone has any suggestions, I would really appreciate it. I have combed the forums and tried many of the suggestions but so far nothing works.

finally got it working again by the following:

  1. Downloaded the latest zip
  2. Copied all files (excluding all files beginning with “.”) to my web folder, overwriting what was there
  3. sudo chown -R www-data:www-data mywebfolder/
  4. In browser went to https://mywebsite/update?secret=mysecretkeyhere
  5. Got message asking me to reload after a while, which I did

Hopefully this helps someone else who may be stuck. Thanks.

1 Like