WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #31018, comment 20


Ignore:
Timestamp:
04/08/2019 04:23:16 PM (7 months ago)
Author:
hr1232
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31018, comment 20

    initial v1  
    22
    33I have to ask myself, why is something so ugly like this still in there?
     4{{{#!php
     5<?php
    46$port_or_socket = strstr( $host, ':' );
     7}}}
    58
    6 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).
     9mysql_connect is long gone and 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 other 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 the connection).
    710
    811Sorting 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...
     12
     13Using mysqli_connect correctly (i.e. without that ugly piece of history) would not only solve the problem of persistent connections not being available in WordPress, it would also shorten the core code by a few unnecessary, ugly lines....