pgsql + php3 expert needed. Can you solve this problem?

Поиск
Список
Период
Сортировка
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.



В списке pgsql-admin по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [ADMIN] Feature patches and Postgres minor versions
Следующее
От: "Mr. Poet"
Дата:
Сообщение: Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem?