[wp-trac] [WordPress Trac] #31018: Persistent database connections with mysqli

WordPress Trac noreply at wordpress.org
Mon Apr 8 16:18:34 UTC 2019


#31018: Persistent database connections with mysqli
-------------------------------------------------+-------------------------
 Reporter:  blobaugh                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Database                             |     Version:  4.2
 Severity:  normal                               |  Resolution:
 Keywords:  needs-refresh needs-unit-tests has-  |     Focuses:
  patch bulk-reopened                            |
-------------------------------------------------+-------------------------
Changes (by hr1232):

 * keywords:  needs-refresh, needs-unit-tests, has-patch, bulk-reopened =>
     needs-refresh needs-unit-tests has-patch bulk-reopened


Comment:

 Has there been any development towards solving this?

 I have to ask myself, why is something so ugly like this still in there?
 $port_or_socket = strstr( $host, ':' );

 mysqli_connect takes port and socket as two different parameters. why not
 make them available as two different configuration parameters in wp-
 config.php, just like any othere modern php app does? If a parameter is
 not set, it defaults to null. If both are set, mysqli decides what to use
 (preferably socket connection).

 Sorting socket- and tcp-based conenctions by looking if the hostname
 contains a colon is a very dirty thing. especially if you doen't even
 check if whatever comes after the colon is a valid port number...

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


More information about the wp-trac mailing list