Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B2B289FB673 for ; Wed, 1 Nov 2006 16:37:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 09924-04-4 for ; Wed, 1 Nov 2006 20:36:53 +0000 (UTC) X-Greylist: delayed 00:21:02.191832 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 731BF9FB7C5 for ; Wed, 1 Nov 2006 14:57:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from h978307.serverkompetenz.net (h978307.serverkompetenz.net [85.214.20.115]) by svr4.postgresql.org (Postfix) with ESMTP id 37E565AF88D for ; Wed, 1 Nov 2006 18:36:40 +0000 (GMT) Received: from [192.168.0.4] (p54BF7482.dip.t-dialin.net [84.191.116.130]) by h978307.serverkompetenz.net (Postfix) with ESMTP id 5F03253EFDB for ; Wed, 1 Nov 2006 19:37:45 +0100 (CET) Message-ID: <4548E934.5090904@adocom.de> Date: Wed, 01 Nov 2006 19:36:36 +0100 From: Dirk Becker User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: cant conect to dynamic host-URL Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200611/1 X-Sequence-Number: 3619 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);