pg.ddx.io pgsql-php@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Function pg_pconnect do not work in FreeBSD 2+ messages / 2 participants [nested] [flat]
* Function pg_pconnect do not work in FreeBSD @ 2001-12-13 17:43 re ert <matlab21@yahoo.es> 0 siblings, 1 reply; 2+ messages in thread From: re ert @ 2001-12-13 17:43 UTC (permalink / raw) To: pgsql-php From: matlab21@yahoo.es Operating system: FreeBSD PHP version: 4.0.6 (and 4.1) Bug description: function pg_pconnect do not work in FreeBSD Operative System: FreeBSD Hello everybody. I am using FreeBSD+Apache+PHP+Postgres. By now, I'm using the newest versions: - FreeBSD 4.4 - Apache_1.3.22 - PHP-4.0.6 ( now, I have proved 4.1 and I have the same problem) - Postgresql-7.1.3 I use the same three last components in Linux ans SunOS and I have not any problems. I always try to compile from source, I always make the same instructions and in FreeBSD, PHP can not connect with PostgreSQL. I install everything with: tar xvzf postgresql-7.1.3.tar.ga cd postgresql-7.1.3 ./configure && make && make install initdb -D /usr/local/pgsql/data postmaster -F -i -D /usr/local/pgsql/data & Now postgres is running. tar xvzf apache_1.3.22.tar.gz cd apache_1.3.22 ./configure cd .. tar xvzf php-4.0.6.tar.gz cd php-4.0.6 ./configure --with-pgsql=/usr/local/pgsql/ --without-mysql --with-apache=../apache_1.3.22 --enable-track-vars make make install cd ../apache_1.3.22 ./configure --enable-module=src/modules/php4/libphp4.a make make install Edit /usr/local/apache/conf/httpd.conf to make use of PHP Start apache /usr/local/apache/bin/apachectl start In this moment I have apache listening in port 80 and postgres in 5432 ( I know this using ps -e and nmap localhost). In this moment apache works, PHP works. I can see the simple script <?php phpinfo(); ?> with no problems. But I can not connect to PostgreSQL database ( tried connect and pg_pconnect functions). After a while apperas this message: Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect() failed: No route to host Is the postmaster running (with -i) at 'localhost' and accepting connections on TCP/IP port 5432? in /usr/home/pfc/phplib/php/db_pgsql.inc on line 47 Database error: Link-ID == false, pconnect failed PostgreSQL Error: 0 () Session halted. I can sure you that postgres is running and I iniciate postmaster with the '-i' flag. In the file /usr/local/pgsql/data/pg_dba.conf I have the following: local all trust host all 127.0.0.1 255.255.255.0 trust host all 192.168.99.1 255.255.255.0 trust NOTE: 192.168.99.1 is the server's IP. I can sure I have installed apache-php-postgres in linux and SunOS with the same method and here work well. I do not know why PHP can not comunicate with PostgreSQL using FreeBSD. I also try to install from ports, but I have the same problem. Thanks a lot for. I am pleased if anyone could solvent this problem. If there is anyone who want contact me (for telling more details, ... ) No doubt write to: matlab21@yahoo.es Xevi Serrats. NOTE: excuse me, english isn't my native language. _______________________________________________________________ Do You Yahoo!? Yahoo! Messenger Comunicación instantánea gratis con tu gente. http://messenger.yahoo.es ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Function pg_pconnect do not work in FreeBSD @ 2001-12-18 19:23 Marco Colombo <marco@esi.it> parent: re ert <matlab21@yahoo.es> 0 siblings, 0 replies; 2+ messages in thread From: Marco Colombo @ 2001-12-18 19:23 UTC (permalink / raw) To: re ert <matlab21@yahoo.es>; +Cc: pgsql-php On Thu, 13 Dec 2001, [iso-8859-1] re ert wrote: > From: matlab21@yahoo.es > Operating system: FreeBSD > PHP version: 4.0.6 (and 4.1) > Bug description: function pg_pconnect do not work in > FreeBSD > Operative System: FreeBSD > > Hello everybody. > > [...] > In this moment apache works, PHP works. I can see the > simple script <?php phpinfo(); ?> with no problems. > But I can not connect to PostgreSQL database ( tried > connect and pg_pconnect functions). After a while > apperas this message: Please, post the parameters you pass to pg_pconnect(). "after a while" means that there's seems to be a kind of (network) timeout, I guess? > Warning: Unable to connect to PostgreSQL server: > connectDBStart() -- > connect() failed: No route to host Is the postmaster > running (with -i) > at > 'localhost' and accepting connections on TCP/IP port > 5432? in /usr/home/pfc/phplib/php/db_pgsql.inc on line > 47 > Database error: Link-ID == false, pconnect failed > PostgreSQL Error: 0 () > Session halted. > > I can sure you that postgres is running and I iniciate > postmaster with the '-i' flag. In the file > /usr/local/pgsql/data/pg_dba.conf I have the > following: > > local all trust > host all 127.0.0.1 255.255.255.0 trust > host all 192.168.99.1 255.255.255.0 trust > > NOTE: 192.168.99.1 is the server's IP. Does psql work? $ PGUSER=<user> psql -h localhost <database> where <user> is the user you're passing to pg_pconnect(), or the user the apache daemon runs with. <database> is of course the database you're tring to [p]connect to. Also try: $ PGUSER=<user> psql -h 192.168.99.1 <database> Both should work. If not, your problem is either with the postgres server or the networking of the system (it may even caused by IP filter rules - or by a misconfigured resolver). > I can sure I have installed apache-php-postgres in > linux and SunOS with the same method and here work > well. I do not know why PHP can not comunicate > with PostgreSQL using FreeBSD. > > I also try to install from ports, but I have the same > problem. > > Thanks a lot for. > > I am pleased if anyone could solvent this problem. > If there is anyone who want contact me (for telling > more details, ... ) > No doubt write to: matlab21@yahoo.es > > Xevi Serrats. > > NOTE: excuse me, english isn't my native language. .TM. -- ____/ ____/ / / / / Marco Colombo ___/ ___ / / Technical Manager / / / ESI s.r.l. _____/ _____/ _/ Colombo@ESI.it ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-12-18 19:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-12-13 17:43 Function pg_pconnect do not work in FreeBSD re ert <matlab21@yahoo.es> 2001-12-18 19:23 ` Marco Colombo <marco@esi.it>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox