• Hi guys,

    we are checking our website compatibility with php 7.

    So we are installed a plugin (https://ww.wp.xz.cn/plugins/php-compatibility-checker) to test compatibility of theme and plugins active.

    The report says we have 3 warnings and 1 error with your plugin:

    FILE: /var/www/vhosts/brandingaddicted.com/httpdocs/wp-content/plugins/wp-super-cache/wp-cache.php
    —————————————————————————————————–
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 2 LINES
    —————————————————————————————————–
    235 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4
    235 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4
    240 | WARNING | INI directive ‘safe_mode_gid’ is deprecated since PHP 5.3 and removed since PHP 5.4
    —————————————————————————————————–

    FILE: /var/www/vhosts/brandingaddicted.com/httpdocs/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-update-settings.php
    —————————————————————————————————————————————-
    FOUND 1 ERROR AFFECTING 1 LINE
    —————————————————————————————————————————————-
    652 | ERROR | Global with variable variables is not allowed since PHP 7.0
    —————————————————————————————————————————————-

    Are they FLASE POSITIVE or we need some fix?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @brandingaddicted

    Line 652 triggers PHP warning if you are using wp-super-cache REST API (very rare case – because WP dashboard doesn’t use these API). WP Super Cache works normally on PHP 7.0 (I’ve installed it on servers which run PHP 7.0). I’m preparing pull request which will fix it.

    If you want to correct this, then you can replace line 652 with:
    global ${$setting};

    Warnings (related to safe_mode) are part of legacy code which supports older version of PHP. WP core and Super Cache still supports PHP 5.2.

    So, they are ‘FALSE POSITIVE’ and you can update PHP to 7.0 or 7.1.

    Thanks for your interest. I hope that helps.

    Regards,
    Sasa

    Thread Starter Branding Addicted

    (@brandingaddicted)

    Hi Sasa,
    your fix worked!
    Thanks for your quick answer!!!
    Have a nice day
    Andrea

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Warnings and Errors in compatibility with php7’ is closed to new replies.