X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 709199FA279 for ; Sat, 20 May 2006 14:46:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 01556-04 for ; Sat, 20 May 2006 14:46:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from relaygw1.kornet.net (relaygw1.kornet.net [61.74.75.196]) by postgresql.org (Postfix) with ESMTP id CF19E9FA218 for ; Sat, 20 May 2006 14:46:36 -0300 (ADT) Received: from [211.48.62.137] ([211.48.62.137]) by relaygw1.kornet.net ([61.74.75.196]) with ESMTP id 2006052102:47:53:041247.23190.57056176 for ; Sun, 21 May 2006 02:47:53 +0900 (KST) Received: from [222.109.159.54] ([222.109.159.54]) by relay9.kornet.net ([211.48.62.137]) with ESMTP id 2006052102:46:39:440597.23663.56613808 for ; Sun, 21 May 2006 02:46:39 +0900 (KST) Subject: can somebody show me a MDB2 dsn with port number? From: kmh496 To: pgsql-php@postgresql.org Content-Type: text/plain Date: Sun, 21 May 2006 02:49:29 +0900 Message-Id: <1148147370.7568.30.camel@var.sirfsup.com> Mime-Version: 1.0 X-Mailer: Evolution 2.1.4 Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: NOT spam-marked. (by Terrace) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/17 X-Sequence-Number: 3517 hello pgsql-php, i looked for a sample of MDB2 dsn array with port number, couldn't find one. my dsn without it is: $dsn_postgresql=array( 'phptype' => "pgsql", 'username' => $pg_username, 'password' => $pg_password, 'hostspec' => "localhost", 'database' => $pg_database ); $options = array( 'debug' => 9, 'portability' => DB_PORTABILITY_ALL, ); the MDB2 docs have just Most variations are allowed: 1 phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644 2 phptype://username:password@hostspec/database_name 3 phptype://username:password@hostspec 4 phptype://username@hostspec 5 phptype://hostspec/database 6 phptype://hostspec 7 phptype(dbsyntax) 8 phptype * I don't see PORTNUMBER in there anywhere* "Additional keys can be added by appending a URI query string to the end of the DSN." what does that mean? and my connect call is global $dsn_mysql,$dsn_postgresql,$DEBUG_DICT_CONNECT,$options; // default has always been mysql, if (!$dsn) $dsn = $dsn_mysql; // if (!$dsn) $dsn = $dsn_postgresql; if (!$dsn) $dsn = $dsn_mysql; // Retries connection to server 5 times. if ($DEBUG_DICT_CONNECT) echo "dsn = " . print_r($dsn) . "
"; if ($DEBUG_DICT_CONNECT) echo "dsn = " . print_r($dsn) . "
"; $db = MDB2::connect($dsn,$options); I have tried $pg_options = array( 'portnumber' => 5534, 'debug' => 9, 'portability' => DB_PORTABILITY_ALL, ); but connection fails. can somebody cut and paste me one please? thanks everybody. joseph.