Link to home
Start Free TrialLog in
Avatar of Julia Lucio
Julia LucioFlag for Canada

asked on

Error triggered when updating site to PHP 8

I have a server with Ionos and I'm using plesk.  My site used PHP 7.4 but now I'm getting a message that it is no longer supported, so I installed PHP 8.0 and two higher versions on the server and switched my site to use PHP 8.0, but when I do, my site throws me a "there has been a critical error on this website".  I need help getting this to work.

Avatar of ste5an
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Updating to PHP8 and later usully required code adjustment and DB server update too.


Migration (select the version)

Changelogs (each version has a changelogs)

What's new (each version has a what's new page)

I'm using PHPCompatibility script to scan the code this find most problem

I also use PHP error logs to catch other errors that cannot be find using the scanner for example
with 8.2 NULL result is managed differently and most PHP function are affected by this.
So this will required more fix compare to 8.0 or 8.1

So I recommend you to set up a test environment with the new server settings and completely test your application.
I'm also using Xdegug locally on the test site to display errors on my pages.

Using wampserver on your test site locally you will have xdebug and be able to switch between PHP version and MYSQL version which is handy.

Don't forget to scan vendors directory if you use any.