From: Reini U. <rei...@gm...> - 2005-10-18 12:38:26
|
Thanks. I'll eventually add this to pgsql.php but this deserves no special release. Of course a socket connection is better than via TCP. BTW: One problem is to trick postgresql >=3D 8 to use a fixed socket filena= me. The default is using now the PID in the filename. Maybe we should document somewhere how to define/use a fixed socket name for postgresql. On 10/18/05, Joel Uckelman <uck...@no...> wrote: > Thus spake strk: > > Hello, I've patched the lib/pgsql.php script > > to allow for local (socket-based) connections. > > > > Required change is at line 45 of that file: > > > > if ( defined($pg_dbhost) && $pg_dbhost !=3D "" ) $connectstring = =3D $pg_dbh > > ost?"host=3D$pg_dbhost ":""; > > > > This way you can set pg_dbhost to the empty string and the socket > > will be used. > > So this is against the 1.2 branch? I think that now we're only fixing > bugs and security problems in the 1.2 branch. > > If you have a look at the config.ini for the current release (1.3.11p1), > (you can see an example in CVS here: http://cvs.sourceforge.net/viewcvs.p= y/phpwiki/phpwiki/config/config-dist.ini?rev=3D1.59&view=3Dmarkup), you'll = see in Part > Two how to connect to the database via a socket. -- Reini Urban |