note 111084 added to function.mysql-connect

From: Date: Sat, 12 Jan 2013 19:16:20 +0000
Subject: note 111084 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-193001@lists.php.net to get a copy of this message
Anyone know what file name Bruce was talking about? He's onto something big where running in W7 is concerned. Bruce Kirkpatrick wrote: On Windows Vista or above, an entry in the Windows/System32/drivers/etc/hosts file causes mysql_connect() connections to "localhost" to timeout and never connect. This happens on php 5.3 and above since it now uses mysql native driver which has changed it connection behavior compared to libmysql.dll in previous versions. It is not a PHP bug, but definitely a configuration issue for users on new windows systems. To get around this, you must remove the entry like this: ::1 localhost and make sure you still have: 127.0.0.1 localhost Also, you could change the code to connect to the ip instead, but that is inconvenient if you have many web sites. This issue occurs on Windows Vista, Windows 7 and Windows Server 2008. ---- Server IP: 69.147.83.199 Probable Submitter: 69.59.92.77 ---- Manual Page -- http://php.net/manual/en/function.mysql-connect.php Edit -- https://master.php.net/note/edit/111084 Del: integrated -- https://master.php.net/note/delete/111084/integrated Del: useless -- https://master.php.net/note/delete/111084/useless Del: bad code -- https://master.php.net/note/delete/111084/bad+code Del: spam -- https://master.php.net/note/delete/111084/spam Del: non-english -- https://master.php.net/note/delete/111084/non-english Del: in docs -- https://master.php.net/note/delete/111084/in+docs Del: other reasons-- https://master.php.net/note/delete/111084 Reject -- https://master.php.net/note/reject/111084 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193001) next »