i have a login script and have used it several times. but i'm unable to connect in 1 host it is known to use PEAR in the code and the config file is: <?php function handlePearError($error) { header('HTTP/1.0 500 Internal Server Error'); //die("$error->message<br />$error->userinfo"); // uncomment this to debug die('Error ocurred, please try again later'); } function &db_connect() { require_once 'DB.php'; $dsn = "mysql://user:pass@unix+localhost/db_name"; $db = DB::connect($dsn); if (DB::isError($db)) { die("Database connection failed."); } $db->setFetchMode(DB_FETCHMODE_OBJECT); $db->setErrorHandling(PEAR_ERROR_CALLBACK, 'handlePearError'); return $db; } ?> PHP: currently i get this error: Database connection failed. why do you think i can't connect to database? how can i see the error?
database details are in config.php: you saw the line: $dsn = "mysql://userass@unix+localhost/db_name"; and they are correct