Upgrading from php7.4 to php8.1

I am upgrading from a perfectly working (and current) grav installation of php7 to php8. The admin pages seem to work fine, but the main homepage seems to give me this rather evil error:

Server Error
Sorry, something went terribly wrong!

E_NOTICE - spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw
For further details please review your logs/ folder, or enable displaying of errors in your system configuration.

I have looked into things. If I do a ‘fresh’ install all is well, but the moment I try to restore my backup, I get this error on the main page. How do I ‘move’ my installation from 7.x to 8.x no guides. I did google searches, composer installs etc. to no avail.

Is there a magical file I need to update? I am using php-fpm which again, works fine if I start with a ‘new’ install.

I figured it out. It was the shortcodes plugin. Once I removed that it worked fine.

1 Like

Didn’t you need it??

Thanks for this, anyway, I am experimenting with upgrading to PHP8 now. This is something I will specifically check.

Actually there were two short code plugins one from 10 years ago and the current one. It was the older one that didn’t work.


Thomas Munn

1 Like