Support » Plugin: TablePress » Is TablePress Compatible with PHP 7 and PHP 7.1

  • Resolved mowill

    (@mowill)


    I want to update my PHP database for my WordPress website. Is TablePress compatible with PHP 7 and PHP 7.1? Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yes, TablePress is fully compatible to PHP 7 and 7.1.

    Regards,
    Tobias

    Hello, I just performed a scan using “PHP Compatibility Checker” and got these warnings for PHP 7.1:

    FILE: /Wordpress/wp-content/plugins/tablepress/libraries/excel-reader.class.php
    ————————————————————————————————————————————————————
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ————————————————————————————————————————————————————
    222 | WARNING | Method name “OLERead::__readData” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    240 | WARNING | Method name “OLERead::__readPropertySets” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    ————————————————————————————————————————————————————

    FILE: /Wordpress/wp-content/plugins/tablepress/views/view-about.php
    —————————————————————————————————————-
    FOUND 2 ERRORS AFFECTING 2 LINES
    —————————————————————————————————————-
    185 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
    186 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    these are just warnings, and TablePress has checks built-in that prevent that these functions are called wrongly. They will only be called if they are available, so nothing to worry about here 🙂

    Regards,
    Tobias

    Hi,

    It appears that the errors in view-about.php lines 185/186 should be updated as these extensions are removed in php 7. The first part of each line is using the updated extension and then the deprecated extension. They should both be using “mysqli”.

    Examples (I’ve edited the original code):

    185 mysqli_get_server_info( $GLOBALS[‘wpdb’]->dbh ) : mysql_get_server_info();

    186 mysqli_get_client_info( $GLOBALS[‘wpdb’]->dbh ) : mysql_get_client_info();

    Thanks,
    George

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi George,

    I don’t really see what you mean here. If WordPress/PHP uses mysqli, that will be used. Otherwise, the mysql_* functions will be called.
    The two lines at https://github.com/TobiasBg/TablePress/blob/master/views/view-about.php#L185-L186 already look like what you are suggesting?

    Regards,
    Tobias

    Hi Tobias,

    Sorry, I looked quickly and thought it was a typo, but you are correct.

    Thanks for the quick reply,

    George

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi George,

    no problem! 🙂

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is TablePress Compatible with PHP 7 and PHP 7.1’ is closed to new replies.