Problems with MDB2 -- Anyone using it?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hey - - -- --- --- - -- -

Any data folks out there? I have started investigating the use of MDB2
for a data object. So far, it is winning the struggle...

I am just trying to connect to a database and run a "select * from
<table>" query.

The language is below, taken essentially from the docs. the language
does, well, nothing. it neither throws an error nor echo's "Worked."
The script just stops at the "connect() line. Even a simple ECHO
statement fails after that line. I shouldn't need UN/PW, but I have
tried it both ways.  

Anybody give me a clue what or how to check what is going on?  

(environment: PHP 5.1, MySQL 5.0, W2K Server and W2K client)

Thanks ----- -  -Ken
require_once 'MDB2.php';

$dsn = array(
    'phptype'  => 'mysql',
    'hostspec' => 'localhost',
    'database' => 'mydatabase',

$options = array(
    'debug'       => 0,
    'portability' => MDB2_PORTABILITY_ALL,

$mdb2 =& MDB2::connect($dsn, $options);
echo is_null($mdb2)." = Null <br>";
if (PEAR::isError($mdb2)) {
} else {
echo "Worked<br>";

Re: Problems with MDB2 -- Anyone using it?

MDB2 doesn't seem to work.

I have had the same problems with it on PostgreSQL.  (See an earlier

I continue to database abstract with pear's DB package.

Swincher wrote:
Quoted text here. Click to load it

Site Timeline