Posted: October 23, 2022 at 9:30 pm
Hi, We recieved an email about moving to PHP 8.0 for WordPress and using Event Espresso 4.10.40.p. We have set this up on a test website, and an error is stopping us. Is there a later release than 4.10.40.p? Here is a link to the pictures of the error https://postimg.cc/gallery/3G9y3RT Thanks |
|
Can you provide a link to the test website so we can look at it in real-time? |
|
Hi Garth, Here is the test website running php8.0 https://wordpress-529350-2947129.cloudwaysapps.com/ Thanks |
|
Hi there, Can you re-enable the Multi Event Registration add-on on the test site please, I’d like to take a look at the request/response in when adding registrations to the cart. |
|
Hi there, Looking at the network requests, this is unusual: Request URL: https://wordpress-529350-2947129.cloudwaysapps.com/wp-admin/admin-ajax.php Is cloudways blocking access to the admin-ajax.php. You’ll need to look at the error logs for more information. It may not even be an error from Event Espresso. Or swap out define( ‘WP_DEBUG’, false ); within wp-config.php for this snippet: Which then logs errors in /wp-content/debug.log and as thats public we can view them. |
|
Hi again, There are no issues on Cloudways. We copied this exact build to a new server (on Cloudways) with PHP 7.3 and the site worked perfectly. Here are some notes from the developer: PHP Deprecated: Required parameter $args follows optional parameter $depth in PHP Deprecated: Required parameter $output follows optional parameter $depth in As you can see, there are a number of errors in this plugin that are not compatible with PHO 8.0 Would you be able to provide us with a version that is 100% compatible with PHO 8.0? Thanks |
|
PHP8 has breaking changes, it tightens up data types a lot and PHP will no longer shrug off an issue with a data type when it’s not what is ‘expected’… PHP7.3 will shrug the issue off and carry on which is likely why you are getting the above error. ‘Loose typing’ makes it easier for ‘non-developers’ or ‘new’ developers to write code because you can basically do whatever you want and PHP ignores issues with types. However, it also makes things much slower because any code you write properly to rely on specific types needs to first check you are given the correct type, tight type control means that is no longer an issue. The error 500 Garth pointed out is a fatal error being thrown on the server, we need the error being thrown to know what the problem is, without it we can’t advise further as it could literally be anything. We have literally thousands of hooks within Event Espresso (not including WP core hooks which also apply) and code hooking into any of the processes running on SPCO could cause that fatal. I don’t think it is an issue within EE core itself as we’d see this on every single site using PHP8. If you check the server’s error logs at the time the request is made it should include a fatal error with details, if not, use the snippet Garth provided on the link to log the errors so we can test and view them. —
You’ve included 1 deprecation notice from the Promotions add-on and 2 from your theme. Deprecation notices are there when PHP makes a change to something which will need to fixed but it works as is, in the next version it will likely throw a fatal error which is why it needs to be fixed and why the deprecation notices is added. So this:
Isn’t causing the issue currently but we will get an update out for the promotions add-on to fix it.
Event Espresso is PHP8 compatible as is. |
|
Hi, Thank you so much for your help, the developer was able to fix it now, and it all seems to be working. Thanks |
|
Great, I’m glad it’s now working for you. |
|
The support post ‘Event Espresso with PHP 8.0’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.