Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem?

From: "Mr(dot) Poet" <jd(at)linuxports(dot)com>
To: Robert Chalmers <robert(at)chalmers(dot)com(dot)au>
Cc: pgsql-admin(at)postgresql(dot)org, php <php3(at)lists(dot)php(dot)net>
Subject: Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem?
Date: 1998-12-27 07:02:12
Message-ID: Pine.BSF.3.96.981226230151.14104B-100000@ezwebhost.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

add your hostname to you hosts file
and make sure you have search yourdomain.com in your resolv.conf

--Linux for Profit--
poet(at)linuxports(dot)com
http://www.linuxports.com
--Power to the Penguin--
On Sun, 27 Dec 1998, Robert Chalmers wrote:

> NOTE: For those who never read past the first sentence - please read the whole
> message.
>
> On a FreeBSD-2.2 Pentium platform,
>
> I have Apache-1.3.3 with Php-3.0.6 as a compiled in module, and
> Postgresql-6.4.1.
>
> Prior to this, I had Apache with phpfi, an earlier version of php3, and
> Postgresql-6.1, which worked fine.
>
> The postgres's pg_hba.conf file remains the same. The php3.ini file is
> operational and fine.
>
> Apache delivers php3 documents with no problem.
> postgresql passes all its regression tests, and also 'works' fine.
>
> However,
> Since I have updated, either php3, or pgsql, is refusing a connection from the
> php3 engine to the database.
>
> This is the Error message delivered to the Browser, from the document I called
> "begin.php3", which is at;
> http://www.chalmers.com.au/~robert/begin.php3
>
> Warning: Unable to connect to PostgresSQL server: connectDB() -- unknown
> hostname: nanguo in
> /usr/home/robert/www/begin.php3 on line 9
> Database NOT Connected.
>
>
> The document could not be simpler. This is it. 14 lines of code.
>
> <html>
> <body>
> <?php $database = pg_connect("host=nanguo dbname=ecotourism port=5432"); ?>
> <br>
> <?php if ($database):
> echo "Database Connection.";
> else:
> echo "Database NOT Connected.";
> endif;
> ?>
> <br>
> </body>
> </html>
>
>
>
> In short, I now have a completly new, up to date suite of software, that works
> perfectly, just won't do the 'connect to database' bit from php3!
>
> The question is: What is telling me that "unknown hostname: nanguo" error. and
> what can I do to fix it?
>
>
>
> I'd really appreciate a solution to this. I need to be able to talk to the
> databases.
> Thanks
> Robert
>
> --
> http://www.chalmers.com.au Chinese Language Studies.
> http://4qir.quantum-radio.net.au World Music Radio.
> phone:61-7-49440357 - fax:61-7-49512832 icq#11252938.
> Courses and Resources and Radio 4QIR. Working for Whirled Peas.
>
>
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe(at)lists(dot)php(dot)net
> To subscribe to the digest list: php3-digest-subscribe(at)lists(dot)php(dot)net
> For help: php3-help(at)lists(dot)php(dot)net Archive: http://www.php.net/mailsearch.php3
> List administrator: zeev(at)zend(dot)com
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Chalmers 1998-12-27 07:23:51 Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem?
Previous Message Robert Chalmers 1998-12-27 06:26:42 pgsql + php3 expert needed. Can you solve this problem?