|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-02 15:48 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-08-02 15:48 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ When asked to specify a server in a TCP/IP environment the name 'localhost' has always worked - it works with lots of other packages. However it is clearly not working with the latest mysqlnd driver. We have to specify 127.0.0.1 - which to me has always been synonymous with 'localhost'. Can we please have the option of specifying 'localhost' back? I understand there are technical reasons for using the IP address, but this is really hard to explain to our bosses: why the upgrade failed, why the system was down for 3 days, and specifically why this setting was changed to begin with - they just don't understand - I barely understand. Two lines of code should do it: if ($servername == 'localhost') $servername = '127.0.0.1'; PS: I know I've written php but the C code is equally short. Test script: --------------- mysql_connect('localhost', 'root', 'secret'); mysql_connect('127.0.0.1', 'root', 'secret'); Expected result: ---------------- To be able to specify the mysql server name as 'localhost'