Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The new status checks are broken with MySQLi.
warning: mysqli_get_server_info() expects parameter 1 to be mysqli, null given in /Users/ted/Documents/webdata/drupalCVS/includes/database.mysqli.inc on line 24.
If I switch to the "mysql" interface it works great, it detects my 5.0.19, otherwise, I get the warning above and the MySQL version is empty.
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal_mysqli_cvs20060903.diff.txt | 1.11 KB | zoeloelip |
#3 | mysqli_status_report.patch_0.txt | 1.14 KB | davemicc |
#2 | mysqli_status_report.patch.txt | 1.14 KB | davemicc |
#1 | mysqli_1.patch | 533 bytes | m3avrck |
Comments
Comment #1
m3avrck CreditAttribution: m3avrck commentedHere's a patch which fixes this. There was not $connection to lookup. Note, we don't have to pass a valid $url to connect to the database to get the version information, an empty string works.
Comment #2
davemicc CreditAttribution: davemicc commentedThat patch causes Drupal to give me an "Unable to connect to database server" access denied error. This patch passes the global $active_db connection object to mysqli_get_server_info() which seems to be consistent with what the other functions in the file do.
Comment #3
davemicc CreditAttribution: davemicc commentedOops... I forgot to configure my editor to use spaces instead of tabs.
Comment #4
m3avrck CreditAttribution: m3avrck commentedHmm strange, yeah I should have used the global $db_active.
Nice work Dave, better patch!
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedconfirmed fixed
Comment #6
calebgilbert CreditAttribution: calebgilbert commentedCan confirm that this patched worked for me too. Thanx.
Comment #7
zoeloelip CreditAttribution: zoeloelip commentedAny reason why mysqli_get_server_info is called twice? Why not use $info from the first call?
Comment #8
drummCommitted to HEAD.
Comment #9
(not verified) CreditAttribution: commented