Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Hi Jos,

    Thank you for reporting. This has been fixed in version 2.0.3.

    Thread Starter Jos Klever

    (@josklever)

    Thanks!

    Wordpress 4.8 / PHP 7.1
    Google Pagespeed Insights 2.0.3
    PHP Compatibility Checker 1.4.3

    Scan Results for PHP 7.0 Compatibility
    Google Pagespeed Insights – Warnings: 18 Errors: 5

    ===
    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
    ———————————————————————————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————
    853 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php
    ———————————————————————————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————
    518 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php
    ——————————————————————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ——————————————————————————————————————————————————–
    125 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ——————————————————————————————————————————————————–

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php
    —————————————————————————————————————————————————————-
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    —————————————————————————————————————————————————————-
    149 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    189 | ERROR | Global with variable variables is not allowed since PHP 7.0
    —————————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
    ———————————————————————————————————————————————————
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————
    286 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php
    —————————————————————————————————————————————————————–
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    —————————————————————————————————————————————————————–
    118 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    234 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    —————————————————————————————————————————————————————–

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
    —————————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————————————————————————————-
    254 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    —————————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php
    ———————————————————————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————–
    154 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————–

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
    ———————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————-
    487 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php
    ———————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————-
    179 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php
    —————————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————————————————————————————-
    189 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    —————————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php
    ———————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————-
    341 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php
    ———————————————————————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————–
    446 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————–

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
    ———————————————————————————————————————————————————-
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ———————————————————————————————————————————————————-
    314 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    4382 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4408 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4475 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4547 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    ———————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
    ———————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ———————————————————————————————————————————————————-
    134 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    248 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————-

    FILE: /home/selyutyb/public_html/wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php
    ———————————————————————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————————————————-
    214 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————————————————-
    ===

    Plugin Author Matt Keys

    (@mattkeys)

    Sergey,

    Are you having troubles using the plugin? The version of the Google API Library I am using does support PHP 5.4 up through 7.x, and as such some of the library files are php 5.4 specific, but are not necessarily used if you are on a 7.x server. So I would expect to see some of these messages above but I would not expect them to effect actual performance.

    WordPress supports a wide range of PHP versions and I am trying to do my best to support as much as I can.

    If you are having problems with the plugin not working, please post a new support thread with details of the problems that you are having.

    Thanks,

    Matt

    Hi, Matt.

    The plugin works fine, but when testing for compatibility with PHP7 issued error messages.

    Report PHP7

    Plugin Author Matt Keys

    (@mattkeys)

    Okay sounds good. There is nothing for me to do here, this scan is checking for potential conflicts by scanning all files. The Google API library I am using includes some php 5.4 specific files and functions for backwards compatibility with older versions of PHP and is going to trigger some errors/warnings in the compatibility checker you are using.

    I could *fix* this by using the version of the Google API which does not support php 5.4, however that would break the plugin for those users, only to satisfy a compatibility checker.

    If you run into actual errors in your servers PHP error logs that arise from using the plugin, do let me know. But I have not seen anything of that sort in my own testing or the reports of other users.

    Thanks,

    Matt

    I’m getting the same report. It’s the errors that I worry about as they often contribute to logged-in back-end refresh rates.

    Right now I’m getting 18 Warnings and 5 Errors

    This one concerns me the most
    wp-content/plugins/google-pagespeed-insights/lib/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/File/X509.php

    314 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    4382 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4408 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4475 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
    4547 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

    Appreciate devs who work their arses off and I’m right there with you on the whole ‘keeping up’ with everything… Just looking to share my findings.

    • This reply was modified 7 years, 1 month ago by VentureCore.
    Plugin Author Matt Keys

    (@mattkeys)

    @VentureCore,

    My plugin uses a library from Google that has compatibility for both PHP 7.x as well as older versions of PHP.

    The library will detect the version of PHP you are using and use the appropriate files and functions necessary for the version of PHP you are running.

    If you are getting the errors you mentioned above in your PHP error logs while running PHP 7.x, let me know.

    If these are just flagged from the PHP Compatibility Checker then they are most likely just false-positives. I don’t think the plugin is able to actually determine which files are being used and included, it just scans everything.

    Like I’ve said earlier in this thread I could use a different version of the library from Google which does not include support for these older versions of PHP. However if the only benefit of doing so is that it makes the PHP Compatibility Checker plugin happy, I am not sure that is worth breaking compatibility for all of my users on older versions of PHP.

    Perhaps in the future given more time for development on this project, I can ditch the library from Google completely and make the API requests myself to avoid the issue entirely, but unfortunately that is not a project I currently have the time for.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error when using PHP 7.1 (guzzlehttp)’ is closed to new replies.