For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2006 > RE: [PEAR] Re: Problem setting up mdb2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PEAR] Re: Problem setting up mdb2
Mark Steudel

2006-06-27, 7:00 pm

Ahhh thanks that was it.

-----Original Message-----
From: Lukas Smith [mailto:lsmith@php.net]
Sent: Tuesday, June 27, 2006 2:52 PM
To: pear-general@lists.php.net
Subject: [PEAR] Re: Problem setting up mdb2

Mark Steudel wrote:
> I'm trying to setup mdb2 for the first time and am getting the following
> error:
>
> MDB2 Error: not found
>
> Here's the code setting it up.
>
> require 'MDB2.php';
>
> $dsn = array(
> 'phptype' => 'mysql',
> 'username' => DB_USER,
> 'password' => DB_PASS,
> 'hostspec' => 'localhost',
> 'database' => DB_NAME,
> );
>
> $db =& MDB2::connect($dsn);
>
> if (PEAR::isError($db)) {
> die($db->getMessage());
> }


die($db->getMessage().' - '.$db->getUserinfo());

that would tell you that you probably did not install the mysql driver:
pear install MDB2_Driver_mysql

regards,
Lukas

--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com