Skip Navigation

[Resolved] Critical Error when using PHP 8.0 or higher

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 1 year, 8 months ago.

Author
Posts
#2668925

I am trying to: Switch to PHP higher than 7.4

Link to a page where the issue can be seen: All pages, frontend and backend when using PHP 8.0 or higher.

I expected to see: A working site

Instead, I got: "There has been a critical error on this website. Please check your site admin email inbox for instructions."

I've had this issue for a long time, and just left this particular site on PHP 7.4 hoping it would be fixed. Leaving it on 7.4 is no longer an option. When Types is deactivated, the problem goes away. Experiments done on a local version by turning on and off plugins have shown that the Types Plugin must be where the problem lies. The production server is OpenLiteSpeed. My local instance is Apache.

#2668963

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

Types is tested and should be okay up to PHP 8.1, and we don't have many reports of problems with PHP 8.2, so if you are upgrading just to PHP 8.0 I'm surprised you are seeing problems.

If you have a local environment for testing, can you share details of the fatal error that occurs with Types and PHP 8?

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor.

Try activating Types with PHP 8 and then inspect the log.

Ca n you also clarify, does the error occur if only Types is active? Or does the error require some combination of plugins?

#2669023

It worked if Types was not active. I tried with ONLY Types activated and it worked. After trying combinations, I found that it did not work when both Types and HappyForms were active. I replaced HappyForms with a different form plugin. It appears to be working fine now. I now have PHP 8.2 running.