Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20375

MySQLi connection through TCP/IP even if socket mode is disabled and servername is localhost

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Database related
    • Labels:
      None

      Description

      See : http://php.net/manual/en/mysqli.construct.php

      Specifying the socket parameter will not explicitly determine the type of connection to be used when connecting to the MySQL server. How the connection is made to the MySQL database is determined by the host parameter.

      This means that in ezmysqlidb.php, if server = 'localhost', the connection is done through socket even if $socketPath = false, ending in an error in some case.

        Activity

        Hide
        Gaetano Giunta (Inactive) added a comment - - edited

        Not sure what you want / what is the problem here.
        The behaviour of using pipes instead of TCP is, afaik, standard for the mysql client, not only to php.
        It is imho a nice optimization, and users have the option of using a different hostname or probably changing this via some config parameter

        Show
        Gaetano Giunta (Inactive) added a comment - - edited Not sure what you want / what is the problem here. The behaviour of using pipes instead of TCP is, afaik, standard for the mysql client, not only to php. It is imho a nice optimization, and users have the option of using a different hostname or probably changing this via some config parameter
        Hide
        Arnaud Lafon added a comment - - edited

        The problem is not the mysql client and I know that's a normal behavior, but having a 'Socket' setting which can take 'disabled' is confusing for people who don't know that.
        So from the user point of view it can be considered as bug because he might expect a tcp connection by default (whatever the server value is).

        Here is a WIP PR : https://github.com/ezsystems/ezpublish-legacy/pull/548
        I just need to decide what to do when the situation occurs :
        1. Warn the user but force tcp connection ?
        2. Log an error and force tcp connection ?
        3. Log an error only ?
        Could also be implemented in the setup wizard

        Show
        Arnaud Lafon added a comment - - edited The problem is not the mysql client and I know that's a normal behavior, but having a 'Socket' setting which can take 'disabled' is confusing for people who don't know that. So from the user point of view it can be considered as bug because he might expect a tcp connection by default (whatever the server value is). Here is a WIP PR : https://github.com/ezsystems/ezpublish-legacy/pull/548 I just need to decide what to do when the situation occurs : 1. Warn the user but force tcp connection ? 2. Log an error and force tcp connection ? 3. Log an error only ? Could also be implemented in the setup wizard

          People

          • Assignee:
            Unassigned
            Reporter:
            Arnaud Lafon
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: