Re: Num rows for postgres

From: Date: Tue, 30 Jan 2001 08:42:58 +0000
Subject: Re: Num rows for postgres
References: 1 2 3 4 5  Groups: php.pear 
Request: Send a blank email to php-pear+get-1214@lists.php.net to get a copy of this message
Paul Meagher wrote: > > > Hi Paul, > > > > There is a test for this, pear/DB/tests/pgsql/009.phpt. Could you try > > running "php run-tests.php pear/DB/tests/pgsql/009.phpt" from the > > top-level PHP directory and let me know whether it fails or succeeds? > > (it succeeds on my box). If it fails, please post the contents of > > pear/DB/tests/pgsql/009.out here. > > > > - Stig > > I tried running this test on an IBM Netfinity 3500 box running linux > slackware with php 4.0.3pl1 and PostgreSQL 7.0.3 > > I ran the test and the first thing that happened was it printed out "skip" > presumably because I didnt' have a database called "test". Is "test" > a > default database that comes with PostgreSQL? I didn't install the db so > I'm not sure if it is or isn't. I presume it is or this test is going to > fail alot. > > So I commented out the skipif test, and ran the rest of them. I got this > error: > > Warning: Unable to connect to PostgreSQL server: PQconnectPoll() -- > connect() failed: Connection refused Is the postmaster running (with -i) at > 'localhost' and accepting connections on TCP/IP port '5432'? in > DB/pgsql.php on line 125 > > I ran into this problem before when I was trying to use PEAR. To fix the > problem I had to explicitly set the protocol as "unix" and not "tcp". My > postgresql setup is running using unix sockets which is, I think, a common > setup. Right, I haven't tested this setup myself. Try editing pear/DB/tests/pgsql/connect.inc and change "pgsql://localhost/test" to "pgsql://unix+localhost/test". - Stig

« previous php.pear (#1214) next »