Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use 127.0.0.1 instead of localhost for db host parameter #857

Closed
wants to merge 1 commit into from

Conversation

Flyingmana
Copy link
Member

localhost means connect via socket, which is in some cases not available
or wrong configured or differs from the place php assumes it.

known Downsides: there may be performance impacts, but I never had something noticeable

Reason: It happens regularly that people have connection problems with localhost, which nearly always got resolved by changing to 127.0.0.1

localhost means connect via socket, which is in some cases not available
or wrong configured or differs from the place php assumes it.
@airbone42
Copy link

It's a long way till then, but the advantage of using localhost is that it also maps correctly for ipv6 where ::1 is the equivalent to 127.0.0.1

@Flyingmana
Copy link
Member Author

which is not true for PDO. PDO maps localhost to the default socket configured in php.
Also I dont think any system will completely disable IPv4

@maksek
Copy link
Contributor

maksek commented Dec 25, 2014

Thanks @Flyingmana, seems like there are different opinions. Lets see if there is more comments or opinions. Maybe voting will help. For now we keep it queue.

@maksek maksek self-assigned this Dec 25, 2014
@danslo
Copy link
Contributor

danslo commented Dec 26, 2014

IPv6 which was already mentioned, so I won't go into that.

I think we should provide a sensible default, which in my eyes is whatever the system/runtime/library decides it to be. If those decide that localhost means a socket instead, it probably has a good reason for that.

I don't think we should design the framework around people that configure their stack incorrectly.

@Marko-M
Copy link
Contributor

Marko-M commented Dec 26, 2014

👍 for what @danslo wrote. We should use localhost, and envirnoment can then resolve depending on how it's configured.

@maksek
Copy link
Contributor

maksek commented Jan 9, 2015

Hi @Flyingmana,
Resolution: reject, Reason: taking in account comments from @Marko-M, @danslo, @airbone42 and Magento Core team discussion, we agreed to keep localhost.
Thanks and looking forward for more PR.

@maksek maksek closed this Jan 9, 2015
mmansoor-magento pushed a commit that referenced this pull request Feb 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants