DataObjects: problem connecting to postgres

From: Date: Fri, 28 Mar 2003 13:28:01 +0000
Subject: DataObjects: problem connecting to postgres
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4496@lists.php.net to get a copy of this message
Hi, Running createtables.php on the command line for my postgres DB doesn't work. It says the db doesn't exists, but the same DSN works fine with DB and MDB. Here's the debug info CREATING FOR pgsql://postgres:xxxx@localhost/sixnet
CONNECT       : NEW CONNECTION
CONNECT       : pgsql://postgres:xxxx@localhost/sixnet d3a68a9e7862280d4fd844a0cf67ad08
CONNECT       : a:1:{s:32:"d3a68a9e7862280d4fd844a0cf67ad08";O:8:"db_error":8:{s:20:"error_message_prefix";s:0:"";s:4:"mode";i:1;s:5:"level";i:1024;s:4:"code";i:-25;s:7:"message";s:26:"DB Error: no such database";s:8:"userinfo";s:40:"pgsql://postgres:xxxx@localhost/sixnet";s:9:"backtrace";a:9:{i:0;a:6:{s:4:"file";s:32:"/usr/local/share/php/pear/DB.php";s:4:"line";i:605;s:8:"function";s:10:"pear_error";s:5:"class";s:8:"db_error";s:4:"type";s:2:"->";s:4:"args";a:5:{i:0;s:26:"DB Error: no such database";i:1;i:-25;i:2;i:1;i:3;i:1024;i:4;s:0:"";}}i:1;a:6:{s:4:"file";s:34:"/usr/local/share/php/pear/PEAR.php";s:4:"line";i:509;s:8:"function";s:8:"db_error";s:5:"class";s:8:"db_error";s:4:"type";s:2:"->";s:4:"args";a:4:{i:0;i:-25;i:1;i:1;i:2;i:1024;i:3;s:0:"";}}i:2;a:6:{s:4:"file";s:39:"/usr/local/share/php/pear/DB/common.php";s:4:"line";i:297;s:8:"function";s:10:"raiseerror";s:5:"class";s:4:"pear";s:4:"type";s:2:"::";s:4:"args";a:7:{i:0;N;i:1;i:-25;i:2;N;i:3;N;i:4;s:0:"";i:5;s:8:"DB_Error";i:6;b:1;}}i:3;a:6:{s:4:"file";s:38:"/usr/local/share/php/pear/DB/pgsql.php";s:4:"line";i:85;s:8:"function";s:10:"raiseerror";s:5:"class";s:8:"db_pgsql";s:4:"type";s:2:"->";s:4:"args";a:1:{i:0;i:-25;}}i:4;a:6:{s:4:"file";s:32:"/usr/local/share/php/pear/DB.php";s:4:"line";i:283;s:8:"function";s:7:"connect";s:5:"class";s:8:"db_pgsql";s:4:"type";s:2:"->";s:4:"args";a:2:{i:0;a:9:{s:7:"phptype";s:5:"pgsql";s:8:"dbsyntax";s:5:"pgsql";s:8:"username";s:8:"postgres";s:8:"password";s:6:"xxxx";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:6:"sixnet";}i:1;b:0;}}i:5;a:6:{s:4:"file";s:43:"/usr/local/share/php/pear/DB/DataObject.php";s:4:"line";i:1211;s:8:"function";s:7:"connect";s:5:"class";s:2:"db";s:4:"type";s:2:"::";s:4:"args";a:1:{i:0;s:40:"pgsql://postgres:xxxx@localhost/sixnet";}}i:6;a:6:{s:4:"file";s:53:"/usr/local/share/php/pear/DB/DataObject/Generator.php";s:4:"line";i:144;s:8:"function";s:8:"_connect";s:5:"class";s:23:"db_dataobject_generator";s:4:"type";s:2:"->";s:4:"args";a:0:{}}i:7;a:6:{s:4:"file";s:53:"/usr/local/share/php/pear/DB/DataObject/Generator.php";s:4:"line";i:114;s:8:"function";s:16:"_createtablelist";s:5:"class";s:23:"db_dataobject_generator";s:4:"type";s:2:"->";s:4:"args";a:0:{}}i:8;a:6:{s:4:"file";s:56:"/usr/local/share/php/pear/DB/DataObject/createTables.php";s:4:"line";i:45;s:8:"function";s:5:"start";s:5:"class";s:23:"db_dataobject_generator";s:4:"type";s:2:"->";s:4:"args";a:0:{}}}s:8:"callback";N;}}
DB Error: no such database Any ideas? TIA - Jeroen

« previous php.pear.general (#4496) next »