Support

Home Forums Event Espresso Premium PHP 7 Causing Errors

PHP 7 Causing Errors

Posted: February 14, 2018 at 7:15 pm

Viewing 6 reply threads


EastBayDev

February 14, 2018 at 7:15 pm

Hello,

We are using EE4. I ran a compatibility check using WP Engines PHP Compatibility Checker. I received a number of errors.

Can I have WP Engine safely update or not. They don’t support OPCache.

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/dompdf.php
——————————————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————
184 | ERROR | Function split() is deprecated since PHP 5.3 and removed since PHP 7.0; Use preg_split() instead
——————————————————————————————————————

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/page_frame_reflower.cls.php
—————————————————————————————————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————————————————————————
209 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.
—————————————————————————————————————————————————————————

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/page_cache.cls.php
—————————————————————————————————————————————————
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
—————————————————————————————————————————————————
41 | WARNING | Method name “Page_Cache::__query” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
—————————————————————————————————————————————————

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/renderer.cls.php
—————————————————————————————————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————————————————————————
222 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.
—————————————————————————————————————————————————————————

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/table_frame_decorator.cls.php
———————————————————————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
———————————————————————————————————————————————
173 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
———————————————————————————————————————————————

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/third_party_libs/dompdf/include/abstract_renderer.cls.php
—————————————————————————————————————————————–
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————————————–
281 | ERROR | The function imagecreatefrombmp() is not present in PHP version 7.1 or earlier
—————————————————————————————————————————————–

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/libraries/rest_api/ModelDataTranslator.php
————————————————————————————————————————–
FOUND 1 ERROR AFFECTING 1 LINE
————————————————————————————————————————–
294 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
————————————————————————————————————————–

FILE: /nas/content/live/ebwomen/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php
—————————————————————————————————————–
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————–
1708 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
—————————————————————————————————————–


Josh

  • Support Staff

February 15, 2018 at 6:28 am

Hi there,

Those warnings are benign. For example, where the automated scan reports this:
Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead

This the the actual code it’s warning about:

if ($wpdb->use_mysqli) {
    return mysqli_errno($wpdb->dbh);
} else {
    return mysql_errno($wpdb->dbh);
}

What that code does is it checks for mysqli support first so servers with PHP 7 will use the first part of the conditional and older servers will use the second part.


EastBayDev

February 15, 2018 at 1:26 pm

I am working with WP Engine. They created a test install so we could test the site running PHP 7. They confirmed that the test install is running PHP 7, but I still see this message: Event Espresso recommends PHP version 5.6.32 or greater for optimal performance. You are currently running version 5.6.31-4+wpengine10.

I deactivated and deleted EE4; I re-installed and activated it but the message remains.

Please help.


Josh

  • Support Staff

February 15, 2018 at 2:45 pm

Hi EastBayDev,

The message will remain until it’s dismissed. If you have doubts about the PHP version installed on your server, you can install the Health Check plugin and it will also report the PHP version on a page from your WordPress Dashboard.


EastBayDev

February 15, 2018 at 5:52 pm

Hi Josh,

I’m not sure this is part of the PHP 7 issue, it’s running PHP 7 and everything looks okay. However, I can’t get past maintenance mode. I’ve reset/deleted the data several times. I ran the database update again and again, but I keep getting the following message: As part of the process for updating Event Espresso, your database also needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script.

There are warnings each time that I run it. What do you suggest?


Tony

  • Support Staff

February 16, 2018 at 2:53 am

There are multiple migrations to run when going from EE3 to EE4 so have you ran through them all?

Can you add a screenshot of what you currently see?

https://eventespresso.com/wiki/ troubleshooting-checklist/#screenshots

Repeat the migration process untill EE shows there are no more migrations.

There are warnings each time that I run it.

Most of the warnings are generally nothing to worry about, for example they may say something along the lines ‘Could not find attendee object ID 111, created new attendee object’, they are there for reference if anything comes up later down the line.

However it does depend on the warning so we would need more details of what you see to know for sure.


EastBayDev

February 16, 2018 at 10:41 am

Hi Tony,

Thank you. “Repeat the migration process untill EE shows there are no more migrations.” That did it.

Viewing 6 reply threads

The support post ‘PHP 7 Causing Errors’ 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