Re: mysql->connect unix socket and host:port feature

From: Date: Sat, 09 Feb 2002 19:45:33 +0000
Subject: Re: mysql->connect unix socket and host:port feature
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4517@lists.php.net to get a copy of this message
On Sat, 09 Feb 2002 20:12:48 +0100 "Tomas V.V.Cox" <cox@idecnet.com> wrote: > Pierre-Alain Joye wrote: > You are late this time, this is implemented and documented :-) :) better late than never ;), but... If you take a look in the mysql connect function, if you use unix socket connection, the function does not take care about the host. And the problem is the admin of my customer use a mix of host/port and unix socket. if ($dsninfo['protocol'] == 'unix') { $dbhost = ':' . $dsninfo['socket']; } else { $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; if ($dsninfo['port']) { $dbhost .= ':' . $dsninfo['port']; } } If protocol is unix, cya for the host. The mysql must be accessed with these parameters : unix socket :/var/mysqlmyweb.sock host : localhost port : 13306 user : mywebuser pass : thepass I try to told him it s completly stupid to run multiple main instances of mysql on a simple sparc server (the basic one) and in the same way for iplanet, 5 sec for a single query with 2 where clauses on a 2000 records table... I certainly miss something during the stress of installation (I hate iplanet for ever ;) ) or I m a complet dummy and need to sleep for a while ;). btw anyone has good experience with iplanet/php will be welcome :). pa

« previous php.pear.dev (#4517) next »