PEAR, MDB2

PEAR, MDB2

Posted by: kidsilver
Posted on: 2006-10-21 15:45:00

I installed PEAR into the home directory of a PHP5 website. I followed the instructions in the DH wiki and in this post:
http://discussion.dreamhost.com/showthreaded.pl?Cat=&Board=forum_programming&Number=6183&page=&view=&sb=&o=&vc=1#Post6183

Everything went well except for setting the include path. No matter what I tried, my script could not locate MDB2.php. I escaped this the cheap and lazy way by simply changing the call to MDB2.php to include the full path:

include_once('/home/.atari/myusername/pear/php/MDB2.php');

OK then! This got me past the MDB2 errors I was having, but now I have a new problem: my script can't access the database! I am using the following syntax for the DSN connection:

$BX_config['dsn'] = 'mysql://myUserName:myPassword@mysql.mysite.com/myDatabaseName';

These credentials work just fine when trying to access phpMyAdmin, leading me to believe one of two things:

1) By cheating on the include path, I have introduced a problem, not fixed one.

2) This type of DSN connection is not supported.

Is anyone else using MDB2 without error on a PHP5 DH site? Ideas? All comments appreciated!

UPDATE: Got it! I had to also install MdB2_Driver_mysql. Now, I just have to deal with the SQL errors this application (planet-php) is giving me!

Edited by kidsilver on 10/21/06 05:14 PM (server time).

Tags: peardreamhostphp5dhhome directorywikipl