Page 1 of 1

How to get PHP to recognize a new class extended from MDB2?

Posted: Wed Apr 06, 2011 5:17 pm
by jonathanm
Hi, all.

I'm a total noob at PHP and PEAR. I'm running PHP 5.3.6 on Windows XP Pro.

I've written a new class, MDB2_Driver_pfusionsql that extends MDB2_Driver_Common. I placed it in its own file, pfusionsql.php, under PEAR/MDB2/Driver.

On my web page code, I invoke it by setting the DSN with
$dsn['phptype'] = 'pfusionsql';
and with other appropriate names/values. Then I use the MDB2::connect($dsn) method. That returns an error object with the following messages:

MDB2 Error: not found
unable to find package 'MDB2_Driver_pfusionsql' file 'MDB2\Driver\pfusionsql.php'

I don't know anything about building packages or anything like that. I just figured if I put the code under the right directory it would be recognized.

Can anyone tell me how to make PHP recognize this new code?

Re: How to get PHP to recognize a new class extended from MD

Posted: Thu Apr 07, 2011 10:29 am
by jonathanm
OK. Figured it out. What was happening was the file containing my new class was failing is_readable() due to permissions.