Summary | Fatal error using localhost MySQL with port number |
Queue | Horde Base |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | a.p.meiners (at) planet (dot) nl |
Created | 03/29/2011 (5212 days ago) |
Due | |
Updated | 06/30/2011 (5119 days ago) |
Assigned | 05/21/2011 (5159 days ago) |
Resolved | 06/30/2011 (5119 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
[jan] Convert host parameter from "localhost" to "127.0.0.1" in MySQL
drivers (
Request #9738).5 files changed, 46 insertions(+), 31 deletions(-)
http://git.horde.org/horde-git/-/commit/05341a899795de7b85ee1ace58ffe4969baa677d
State ⇒ Assigned
Version ⇒ Git master
this is probably what most users intended, and the magic behavior of
MySQL to use sockets if the host is "localhost" already caused many
WTF moments for administrators.
OTOH many admins and developers might already be aware of this
behavior and could be using "localhost" intentionally.
State ⇒ Feedback
Assigned to Jan Schneider
I tend to convert "localhost" to "127.0.0.1" automatically, because
this is probably what most users intended, and the magic behavior of
MySQL to use sockets if the host is "localhost" already caused many
WTF moments for administrators.
OTOH many admins and developers might already be aware of this
behavior and could be using "localhost" intentionally.
Don't throw exception when setting port number while using localhost
in PDO MySQL driver (
Bug #9738)3 files changed, 3 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/064351164191941ac0fc781b74bd752802448e90
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Fatal error using localhost MySQL with port number
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
During configuration you can enter 'localhost' as TCP MySQL host. If
however you do not delete the port number this results in a fatal
error and Horde4 will not start. If you have deleted the port number,
saved the config, move to a different tab and change paramaters on
that tab and again save the config, the default port number is again
entered in the MySQL host tab and thus again results in a fatal error.
Workaround:
There is a simple workaround which if included in the installation
documentation can avoid the issue. If instead of 'localhost' you enter
the IP address 127.0.0.1 as the TCP host, you can leave the port
number unchanged and all works fine.
Solution:
A more elegant solution would possibly be adding one line of code
which behind the scenes changes or equates 'localhost' with the IP
address 127.0.0.1 or simply neglects the port value in case of
'localhost' or '127.0.0.1' entry.