Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

cant conect to dynamic host-URL



Hi there, ive got a dynamic URL like myname.dyndns.org which links to my server where my postgres database runs. The Problem is that the Connection fails with error: "Warning: pg_connect(): Unable to connect to PostgreSQL server: unknown host name: adocom.dyndns.org"

Now, if i ping my dynamic address and use the resulting IP for the Connection all works fine. I dont know where my i did something wrong, i use an Java-Applet which connects also with the dynamic Address and works fine too. :(

Here is my php-Code i use:

// Option-class which holds some information
class Option {
   var $host    = "myname.dyndns.org";     // Adresse des DBMS-Servers
var $port = "5432"; // Port auf dem das DBMS laeuft
   var $dbname  = "Database";                   // Name der Datenbank
   var $user    = "postgres";                        // DBMS Benutzer
   var $passwd  = "secret";                         // DBMS Passwort
}

// Connection in index.php
$conn = pg_connect("host=".$OptObj->host." port=".$OptObj->port." dbname=".$OptObj->dbname." user=".$OptObj->user." password=".$OptObj->passwd);



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group