DB connect error

From: Date: Thu, 03 Jun 2004 10:30:56 +0000
Subject: DB connect error
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12853@lists.php.net to get a copy of this message
I just received the following support from my webhost. <support> I looked at your config.php file in the root directory and couldn't find any misconfiguration there. But I am not really familiar with the syntax either. On the database server I couldn't find any signs of access to the database int he logfiles. I called the script home.php from the command line with "strace php4 home.php4". The following line caught my attention: connect(5, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = -1 ENOENT (No such file or directory) If I interpret this the right way, the script tries to open a socket on the local server. But the databases are running on another server. I really don't know PEAR that well in order to be able to judge where you would tell the server not to use the localhost. But maybe this already helps you</support> Unfortunately it doesn't help. I am using the following method to connect: require_once 'DB.php'; $dsn = array( 'phptype' => 'mysql', 'username' => 'someuser', 'password' => 'apasswd', 'hostspec' => 'db.ourhost.com', 'database' => 'thedb', ); $options = array( 'debug' => 2, 'portability' => DB_PORTABILITY_ALL, ); $db =& DB::connect($dsn, $options); if (DB::isError($db)) { die($db->getMessage()); } I keep getting the following error message: Fatal error: DB Error: connect failed in /homepages/24/dirabcd/htdocs/_pear/pear/PEAR.php on line 762 It is driving me insane. Could anybody please help me out here ? Thx

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