Problems in Upgrade to PHP7

I am getting the following warning messgae in php compatibility checker for Blogger importer plugin

FILE: /home1/aarwinsw/public_html/wp-content/plugins/blogger-importer/blogger-importer.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


57 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


For Easy Azon Pro the following errors

FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorInterface.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


FILE: /home1/aarwinsw/public_html/wp-content/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php


FOUND 1 ERROR AFFECTING 1 LINE


3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)


The following warnings for Genesis

FILE: /home1/aarwinsw/public_html/wp-content/themes/genesis/lib/functions/layout.php


FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES


510 | WARNING | Function name “__genesis_return_content_sidebar” is discouraged; PHP has reserved all method names with a double underscore prefix for future use

525 | WARNING | Function name “__genesis_return_sidebar_content” is discouraged; PHP has reserved all method names with a double underscore prefix for future use

540 | WARNING | Function name “__genesis_return_content_sidebar_sidebar” is discouraged; PHP has reserved all method names with a double underscore prefix for future use

555 | WARNING | Function name “__genesis_return_sidebar_sidebar_content” is discouraged; PHP has reserved all method names with a double underscore prefix for future use

570 | WARNING | Function name “__genesis_return_sidebar_content_sidebar” is discouraged; PHP has reserved all method names with a double underscore prefix for future use

585 | WARNING | Function name “__genesis_return_full_width_content” is discouraged; PHP has reserved all method names with a double underscore prefix for future use


The following warning for Pushpress

FILE: /home1/aarwinsw/public_html/wp-content/plugins/pushpress/class-pushpress.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


6 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


The following warning for SEO Friendly Images Plugin

FILE: /home1/aarwinsw/public_html/wp-content/plugins/seo-image/seo-friendly-images.class.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


14 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


The following warnings for THEMEDY TOOLBOX

FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/compatibility/themedy-visual-designer/themedy-visual-designer.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


14 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/custom-css/custom-css/csstidy/class.csstidy.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


249 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/custom-css/custom-css/csstidy/class.csstidy_print.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


69 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/custom-css/custom-css/csstidy/class.csstidy_optimise.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


50 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/custom-css/custom-css/custom-css.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


1580 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


FILE: /home1/aarwinsw/public_html/wp-content/plugins/themedy-toolbox/custom-css/custom-css/class.jetpack-user-agent.php


FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE


99 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.


Please tell me how to fix these errors and warnings.

  • Dimitris Kalliris
    • Support Team Lead

    Hey there Aarati Rebello,

    hope you’re doing good and thanks for reaching us! :slight_smile:

    There’s no easy way to resolve these errors I’m afraid and that’s mainly because it’s a dev’s work.

    You could try to find alternatives (codewise) for each issue reported, but that will end up with an altered version of each plugin (or theme) as these are changes that should be done in plugins’ files and any update after that will result loosing these updates.

    I’d rather contact each plugin/theme author about these messages for further info. Some of them may be safe, so you could update to PHP v.7.x, but some of them may not work well with latest versions so you may have to start finding alternatives.

    For example, only Easy Azon Pro states “errors” and should have issues most probably. The rest of plugins and Genesis theme are having “warnings” instead, that may interfere in some parts but shouldn’t cause a overall broken state (at least in theory).

    Either way, it may be better replicating your setup in a server running PHP v.7. to be absolutely sure how things work, before upgrading PHP version of the server with your live website.

    Hope that was some help, let me know if further assistance is required here!

    Warm regards,

    Dimitris

  • Aarati Rebello
    • New Recruit

    Hi Dimitris,

    Thanks for replying….

    I want to know would it better to wait for 3-4 months before upgrading to allow these plugin and theme developers to come out with updates to make them better compatible with PHP 7 ?…would that be the right way to go ?

  • Dimitris Kalliris
    • Support Team Lead

    Hey there Aarati Rebello,

    either way, you’d better create a test installation in PHP v.7.x and setup all plugins and themes you’re using to test them under “real” conditions.

    Keeping PHP v.5.6. isn’t that bad, I guess you can still use this and get back to PHP 7 Compatibility after couple of months, especially if you have some insights that these errors should be gone with future releases.

    Take care,

    Dimitris