Re: DB Error: not found
| From: | Helgi | Date: | Thu, 18 Dec 2003 20:52:59 +0000 |
| Subject: | Re: DB Error: not found | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9688@lists.php.net to get a copy of this message | ||
Burhan Bozkurt wrote:
Hi, I was able to run my script at my previous server but now I can not connect to my database with PEAR DB. I can connect with the standart php connection functions. Here is my connection script ------------ function &db_connect() {You sure that the DB pack is installed on the system ? :)require_once 'DB.php';$db_host = 'localhost'; $db_user = 'myusername'; $db_pass = 'mypass';$db_name = 'mydb';$dsn ="mysql://$db_user:$db_pass@$db_host/$db_name" or die("dsn failed");$db = DB::connect($dsn);if(DB::isError($db)) { die($db->getMessage()); }$db->setFetchMode(DB_FETCHMODE_OBJECT); $db->setErrorHandling(PEAR_ERROR_DIE);return $db;} ------------ and I get this error message: DB Error: not found I know my database is there and there is nothing wrong with user, passwd, db name and table. What could be the reason for that. I would be very glad to have any kind of help. Thank you. __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/