[wp-trac] [WordPress Trac] #51988: Call to undefined function mysql_connect()

WordPress Trac noreply at wordpress.org
Mon Feb 20 16:03:32 UTC 2023


#51988: Call to undefined function mysql_connect()
-------------------------------------------------+-------------------------
 Reporter:  bgin                                 |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Database                             |     Version:  5.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  php8 has-patch needs-testing has-    |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55367" 55367]:
 {{{
 #!CommitTicketReference repository="" revision="55367"
 Bootstrap/Load: Check that either `mysqli_connect()` or `mysql_connect()`
 is available.

 This resolves a fatal error and displays an actionable message if the
 `mysqli` PHP extension is missing.

 Previously, `wp_check_php_mysql_versions()` performed an early check
 whether `mysql`, `mysqli`, or `mysqlnd` extensions are loaded, but that
 did not work if the `mysqlnd` extension is the only one present.

 Checking specifically for `mysqli_connect()` or `mysql_connect()`
 functions should be a more reliable approach and more closely mirrors the
 existing checks in the `wpdb` class.

 Follow-up to [1955], [4489], [7234], [12732], [19760], [27257], [36434].

 Props bgin, desrosj, dimadin, ipajen, hellofromTonya, sc0ttkclark, azaozz,
 SergeyBiryukov.
 Fixes #51988.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51988#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list