Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem?
От | Mr. Poet |
---|---|
Тема | Re: [PHP3] pgsql + php3 expert needed. Can you solve this problem? |
Дата | |
Msg-id | Pine.BSF.3.96.981226230151.14104B-100000@ezwebhost.com обсуждение исходный текст |
Ответ на | pgsql + php3 expert needed. Can you solve this problem? (Robert Chalmers <robert@chalmers.com.au>) |
Список | 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@linuxports.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@lists.php.net > To subscribe to the digest list: php3-digest-subscribe@lists.php.net > For help: php3-help@lists.php.net Archive: http://www.php.net/mailsearch.php3 > List administrator: zeev@zend.com > > >
В списке pgsql-admin по дате отправления: