Support

Home Forums Event Espresso Premium Warning on the backend that needs to be cleared up

Warning on the backend that needs to be cleared up

Posted: July 18, 2023 at 10:33 am

Viewing 5 reply threads


wanaadmin

July 18, 2023 at 10:33 am

Getting a warning anytime I envoke wp-cli. I know my host is going to be upgrading us to PHP 8.1 and wants everything tip-top shape as possible. Any help is appreciated!

This is the message, added xxx’s where there’s internal server name and the site name itself: PHP Warning: Undefined array key “SERVER_NAME” in /home/www/xxxxx/xxxxxxxxxxxxx.com/htdocs/wp-content/plugins/event-espresso/espresso.php on line 179

Is something that can be cleared up easy?

Thank you!


Rio

  • Support Staff

July 18, 2023 at 11:18 pm

Can you paste all the error? You can send it to support@eventespresso.com

Do you experience when you tried to upgrade the PHP? what is the EE version you are using?

thanks


wanaadmin

July 20, 2023 at 11:20 am

Sorry, just saw this. But here’s the versions:
EE 3.1.37.18.P
PHP 7.4
WP 6.2.2


Tony

  • Support Staff

July 20, 2023 at 2:28 pm

Hi there,

Event Espresso 3 is not PHP8 compatible and will likely throw fatal errors.

EE3 is now considered our legacy product which currently only receives security updates, re-writing the code to be PHP8 compatible would be a significant project and not something we will likely undertake now that it has effectively been replaced within EE4+.

The fix for your current issue is to change /event-espresso/espresso.php line 179 from this:

$find = str_replace($_SERVER['SERVER_NAME'], '', $find);

To this:

$find = isset($_SERVER['SERVER_NAME'])?str_replace($_SERVER['SERVER_NAME'], '', $find):'';

That should remove the above warning.

However, I should ask, is there something preventing you from updating to EE4?


wanaadmin

July 21, 2023 at 12:41 pm

Thank you Tony, adding the bit cleared the warning. So much less annoying! The site owner doesn’t want to upgrade after having so much time invested in the current version. But I have passed along that it’s going need to be looked at real soon in order to run PHP 8


Rio

  • Support Staff

July 21, 2023 at 2:56 pm

Check this article about upgrading your Event Espresso.
https://eventespresso.com/wiki/upgrading-event-espresso-from-3-0-19-x-or-lower/

thanks

Viewing 5 reply threads

The support post ‘Warning on the backend that needs to be cleared up’ 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.

Event Espresso