Project

General

Profile

Actions

Bug #49186

closed

Install tool: DB port setting magic

Added by Christian Kuhn over 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2013-06-24
Due date:
2013-06-24
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Currently, the "DatabaseConnect" step is executed, if a "port" setting is missing in typo3_conf_vars db. This is technically ok, since after switch to mysqli in 6.1, the connect methods needs a port setting.

Currently, the bootstrap db connect method tries a split of the former host setting into host and port and then sets the port silently. This is a bit ugly, since this is performed on each and every request. Furthermore, the split can fail, if a ipv6 address is given with a port (eg. [:::1]:3306)

Thus, I suggest to let the bootstrap just redirect to install tool if port is missing, and then implement a solid "silent upgrade" within the database connect class of the step installer before "needsExecuction" is done. This way, if the silent upgrade is ok, the step won't come up. Furthermore, the bootstrap code can be cleaned up from this implicit upgrade.

There is another ticket in this area, regarding 'socket' connection to db. This could also be implemented in the DatabaseConnect then, maybe with a checkbox if host is localhost, no port is needed then.

Furthermore, it is important to note that the mysqli connect method ignores the port setting, if host is set to 'localhost' and not '127.0.0.1', so another "silent upgrade" could switch from string 'localhost' to '127.0.0.1' if the port setting is not the default mysql port 3306.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #48117: Mysql Socket connection fails.ClosedPhilipp Gampe2013-05-12

Actions
Follows TYPO3 Core - Task #49162: Rewrite install toolClosed2011-10-30

Actions
Actions #1

Updated by Ernesto Baschny over 11 years ago

Do not change "localhost" with "127.0.0.1", as the first one connects through a SOCKET and the second one through TCP/IP. It requires different authentication to MySQL and potentially MySQL is not even listening on 127.0.0.1 (just a socket).

Actions #2

Updated by Gerrit Code Review about 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23332

Actions #3

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23332

Actions #4

Updated by Michiel Roos about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF