Re: Re: Bug #16768: mysql_connect("localhost", ...) doesn't connect to localhost! (fwd)

From: Date: Wed, 24 Apr 2002 09:04:06 +0000
Subject: Re: Re: Bug #16768: mysql_connect("localhost", ...) doesn't connect to localhost! (fwd)
References: 1  Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-83241@lists.php.net to get a copy of this message
Hello, yes, this is very related... but we can't figure it out yet why it happend. Please provide as much information as you can find on this... this is a must fix before 4.2.1. Derick On Wed, 24 Apr 2002, Daniel Swarbrick wrote: > I don't know whether this is related or not, but I've also found that since > upgrading to PHP 4.2.0 it is impossible to get mysql_connect() to connect > via a UNIX socket. No matter whether I specify a socket manually or not, it > always connects via TCP. > > I have 4.1.2 running on a different server, and even just specifying > "localhost" for the database host, automatically connects via UNIX socket. > > "Derick Rethans" <d.rethans@jdimedia.nl> wrote in message > news:Pine.LNX.4.44.0204240828120.25959-100000@jdi.jdimedia.nl.../RåÚΖ‰D¶uQ•œ > � > > Hey Zak, > > > > I think this is a nice thing for 4.2.1. I can reproduce it. I hope > > somebody can investigate this before friday (RC1 of 4.2.1 is scheduled > > then). > > > > Derick > > > > ---------- Forwarded message ---------- > > Date: 23 Apr 2002 19:50:29 -0000 > > From: jr-php@quo.to > > To: php-bugs@lists.php.net > > Subject: Bug #16768: mysql_connect("localhost", > > ...) doesn't connect to localhost! > > > > From: jr-php@quo.to > > Operating system: Red Hat Linux 7.2 > > PHP version: 4.2.0 > > PHP Bug Type: MySQL related > > Bug description: mysql_connect("localhost", ...) doesn't connect to > localhost! > > > > After upgrading from PHP 4.1.2 to PHP 4.2.0, MySQL connections fail with > > this error: > > > > Warning: Access denied for user: 'username@my.fully.qualified.name' > > > > Apparently, it is trying to connect to 'my.fully.qualified.name' instead > > of 'localhost' as before. This seems wrong because my mysql_connect() call > > uses 'localhost' as the host name: > > > > mysql_connect("localhost", "username", "password"); > > > > I can work around this by changing all my MySQL grants from > > 'username'@'localhost' to > > 'username'@'my.fully.qualified.name', but that > > seems unnecessary; this should be fixed in PHP. > > > > BTW, I've used the same above mysql_connect() call since the PHP 3.x days > > and it's always worked fine, until now. > > > > > > My PHP configure line: > > ./configure --with-apache=../apache_1.3.24 --enable-track-vars \ > > --with-mysql --with-zlib --with-gd > > > > All PHP configuration settings are defaults. (i.e. php.ini = > > php.ini-dist) > > > > Apache version is 1.3.24. MySQL version is 3.23.49a. > > -- > > Edit bug report at > > http://bugs.php.net/?id=16768&edit=1 > > -- > > Fixed in CVS: > > http://bugs.php.net/fix.php?id=16768&r=fixedcvs > > Fixed in release: G=\›D > > ²‰9A,8“yqhttp://bugs.php.net/fix.php?id=16768&r=alreadyfixed > > Need backtrace: > > http://bugs.php.net/fix.php?id=16768&r=needtrace > > Try newer version: > > http://bugs.php.net/fix.php?id=16768&r=oldversion > > Not developer issue: > > http://bugs.php.net/fix.php?id=16768&r=support > > Expected behavior: > > http://bugs.php.net/fix.php?id=16768&r=notwrong > > Not enough info: > > http://bugs.php.net/fix.php?id=16768&r=notenoughinfo > > Submitted twice: > > http://bugs.php.net/fix.php?id=16768&r=submittedtwice > > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > ----------------------------------------------------------------------- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B ----------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net -----------------------------------------------------------------------

« previous php.dev (#83241) next »