Re: [ADMIN] pgsql + php3 expert needed. Can you solve this problem? (fwd)

Поиск
Список
Период
Сортировка
Искать

Re: [ADMIN] pgsql + php3 expert needed. Can you solve this problem? (fwd)

От:
Terry Mackintosh <terry@terrym.com>
Дата:
Hi again Robert

I forgot to mention also that postmaster needs to be started with the '-i'
option. This may be the main problem.

The older versions used TCP/IP sockets by default, the current version
uses UNIX domain sockets by default, you need TCP/IP sockets for PHP, the
'-i' option says to use TCP/IP sockets.

Terry Mackintosh           http://www.terrym.com
sysadmin/owner  Please! No MIME encoded or HTML mail, unless needed.

Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.4
-------------------------------------------------------------------
Success Is A Choice ... book by Rick Patino, get it, read it!

---------- Forwarded message ----------
Date: Sun, 27 Dec 1998 09:09:29 -0500 (EST)
From: Terry Mackintosh 
To: Robert Chalmers 
Cc: pgsql-admin@postgreSQL.org, php 
Subject: Re: [ADMIN] pgsql + php3 expert needed. Can you solve this problem?

Hi Robert

On Sun, 27 Dec 1998, Robert Chalmers wrote:

> Since I have updated, either php3, or pgsql, is refusing a connection from the
> php3 engine to the database.
> ....
> 
> 
> 

I use PHP 3 all the time, and have never seen the above syntax, is that
PHP/FI syntax? so that may be your problem.  Here is how I do it:

if ( !($database = pg_connect("localhost","5432","","","ecotourism")))
{// NOTE the use of 'localhost', if it's all on 1 box, thats all you need.
   echo "Bad connection to database!

Sorry

.\n"; } else { // Good to go! } >
> echo "Database Connection."; > else: > echo "Database NOT Connected."; > endif; > ?> >
>

> Hope that helps Terry Mackintosh http://www.terrym.com sysadmin/owner Please! No MIME encoded or HTML mail, unless needed. Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.4 ------------------------------------------------------------------- Success Is A Choice ... book by Rick Patino, get it, read it!
FAQ