Support » Plugin: HyperDB » mysqli and PHP7 support? – mysql_connect() being deprecated

  • Resolved Dan & Jennifer

    (@danstuff)


    Hi there!

    Seeing this PHP notice:
    “Deprecated mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead 2 wp-content/db.php:580”

    PHP7 won’t have support for mysql_connect, which also makes HyperDB incompatible with PHP7.

    Is there an ETA for mysqli support?

    Thanks!

    https://wordpress.org/plugins/hyperdb/

Viewing 15 replies - 1 through 15 (of 19 total)
  • in the meantime, trying the mysqli fork here…

    https://github.com/soulseekah/hyperdb-mysqli

    Seems to work with no issues.

    What I’m wondering is when will mysqli be supported in the main plugin – and are there any inherent limitations in HyperDB that prevent it from using mysqli, or have the plugin authors not yet had a chance to make the update?

    If it’s not a compatibility or more complex issue, then I would think the fork above could be merged back into the Hypderdb code… that said, surely the wordpress.com folks running the plugin this is based on have already gone to mysqli?

    Thanks!

    Just checking in… any word on this?

    Thanks!

    dogzilla123

    (@dogzilla123)

    Really need PHP7 support.

    I now have a problem where I need HyperDB for scalability and performance reasons.

    And since PHP7 is giving us 30% speed increase I really cannot consider downgrading back to 5.6.

    So it’s a catch22….. Either we have php7, and struggle with db performance and scale.

    OR we move to 5.6 and struggle with front end performance.

    @dogzilla123 we’re looking at the same situation…

    Nice to see someone else in this forum, hoping to hear from the plugin authors too. 🙂

    Cheers!

    dogzilla123

    (@dogzilla123)

    I tried the linked mysqli solution.

    It appears to work OK however it seems to introduce quite a bit of additional delay into the page loads when compared against a PHP 5.6 install with the original plugin.

    Not sure if this is something specific to my environment as I’m running WordPress in Azure which tends to run somewhat slower anyway.

    I see that the development version (https://downloads.wordpress.org/plugin/hyperdb.zip) will use MySQLi if available so it might be worth testing that (dev is post v1.1)

    archon810

    (@archon810)

    We just spent hours on this, just to realize hyperdb didn’t support utf8mb4 and the solution was not provided as an update. But yeah, here are the commits since v1.1 as per hyperdb’s svn log:

    ————————————————————————
    r1437951 | vnsavage | 2016-06-16 09:57:53 -0700 (Thu, 16 Jun 2016) | 2 lines

    utf8mb4 is safe to use with HyperDB

    ————————————————————————
    r1418984 | vnsavage | 2016-05-17 10:59:31 -0700 (Tue, 17 May 2016) | 2 lines

    Bring in a mysql_fetch_assoc() handler and fix a strict standards error which was reverted in the last commit

    ————————————————————————
    r1410864 | vnsavage | 2016-05-05 02:26:19 -0700 (Thu, 05 May 2016) | 7 lines

    Various improvements:
    – Add MySQLi support with MySQL fallback
    – Handle and retry MySQL timeouts
    – Add support for track server states
    – Add callbacks for: pre/post connect queries, pre/post query statements, adding query comments
    – Better integration with the latest core wp-db features

    ————————————————————————
    r1398095 | vnsavage | 2016-04-18 00:27:38 -0700 (Mon, 18 Apr 2016) | 2 lines

    Remove extra spaces and PHP closing tag

    ————————————————————————
    r1257090 | dd32 | 2015-09-30 20:12:41 -0700 (Wed, 30 Sep 2015) | 3 lines

    Tag hyperdb 1.1 (which was previously in trunk) and bump the Tested-up-to version to 4.3.
    Although WordPress.org is perfectly happy to have the stable version of a plugin in trunk, not everyone who uses hyperdb will realise this, plus it’s more reliable for them to have a tag to base off.

    victoroem

    (@victoroem)

    Can anyone give a tutorial in how to use the updates available in the Github that allow this plugin to function properly with the latest WordPress and with PHP 7, utf8mb4 , etc… ?

    For a complete “noob” I find this quite difficult to understand the correct procedure.

    Should I install first Hyperdb and then apply the updated files available in the Github?

    I found this for example:
    https://github.com/stuttter/ludicrousdb/pull/6

    archon810

    (@archon810)

    So we just tested the code in svn trunk, the one that says it fixes utf8mb4 issues, and it still doesn’t work, just as before – the data with something like 🐬 gets inserted as “????”

    However, this patch seems to work perfectly https://github.com/danielhomer/hyperdb/compare/1.2-branch (via https://wordpress.org/support/topic/utf8mb4-wp-42-not-supported). 🐬 is written and read correctly.

    Can we please get the right fixes in hyperdb trunk and release them as v1.2?

    Daniel Homer

    (@danielhomer)

    Hi all,

    So it has been a while since I’ve looked at this, but my patch still missed some edge cases with mysqli functionality. We tried pushing our patches up into HyperDB, but we got no feedback as doesn’t seem to be maintained at all anymore.

    In the end, we worked with JJJ and moved this work into LudicrousDB (https://github.com/stuttter/ludicrousdb) – I’d encourage everybody to move over to that drop-in instead as it’s actively maintained by some guys that really know their stuff.

    Cheers,
    Dan

    SeBsZ

    (@sebsz)

    Thanks Daniel, I came across a little bug so I left a note in the issue tracker (https://github.com/stuttter/ludicrousdb/issues/11).

    It works fine though! Hope it’s going to be actively maintained, the last commit to db.php was 3 months ago – not too bad.

    Just checking in, an news on getting the mysqli and other updates into a new release?

    Are the authors still around/active? have not seen an author chime in on any threads in here.

    Thanks!
    Dan

    Just checking in, an news on getting the mysqli and other updates into a new release?

    Are the authors still around/active? have not seen an author chime in on any threads in here.

    Thanks!
    Dan

    Waiting for PHP7 support.

    Hello
    Also waiting for php7 support.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘mysqli and PHP7 support? – mysql_connect() being deprecated’ is closed to new replies.