Home » Internationalization » Translation2 » Bug #7573
Fatal error: Class 'MDB2' not found
Details
| Submitted | 2006-05-07 18:51 UTC |
|---|---|
| From | hammam at islamway dot net |
| Assigned | quipo |
| Status | Bogus |
| Package | Translation2 |
| PHP Version | 5.1.2 |
| OS | winxp |
| Roadmaps | (Not assigned) |
Comments
[2006-05-07 18:51 UTC] hammam at islamway dot net
Description:
------------
when i test the code you wrote in the introduction here :
http://pear.php.net/manual/en/package.internationalization.translation2.intro.php
this message was appear:
Fatal error: Class 'MDB2' not found in C:\wamp\www\tests\Translation2\Container\mdb2.php on line 109
[2006-07-08 00:03 UTC] jcscott at scottcomm dot com
I get a similar error, although I have MDB2 installed.
Warning: loadclass(MDB2/Driver/mysql.php): failed to open stream: No such file or directory in /usr/lib/php/MDB2.php on line 335
Warning: loadclass(): Failed opening 'MDB2/Driver/mysql.php' for inclusion (include_path='.:/usr/lib/php') in /usr/lib/php/MDB2.php on line 335
MDB2 Error: not found
[2007-01-14 03:51 UTC] lethe at charter dot net
I'm also having this error. I have both MDB2 and MDB2_Mysql_driver installed. What should I do?
[2007-01-14 16:16 UTC] lethe at charter dot net
Hi Lorenzo. Thanks for replying.
Here is the output of pear list:
avernus:~ lethe$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
MDB2 2.3.0 stable
MDB2_Driver_mysql 1.3.0 stable
PEAR 1.4.11 stable
I'm not sure about the include path. This is my first PEAR package. But if the include path were incorrect, wouldn't I get an error from the require_once statement? Like if I change require_once 'MDB2.php' to require_once 'MDB2x.php', I get a different error, like failed to open stream: No such file or directory in /usr/local/apache2/htdocs/mdb2.php on line 2.
Anyway, where do I check that? My php.ini file? I find this section of my php.ini:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
It looks like it's commented out? I added this line to my php.ini:
include_path = ".:/usr/local/lib/php/"
(that's where my MDB2.php file is) but I still get the error.
OK. I've solved it. I added the line
print_r(get_included_files());
after my include statement, and it said /usr/local/apache2/htdocs/mdb2.php. In other words, I had (stupidly) named my test file the same thing (up to case) as the file to be included. The require_once statement was just including the test file itself. I've changed the name of the test file, and now everything is working.
Thanks for your help, Lorenzo, and sorry to waste your time on what turned out to be a stupid error!
[2007-02-14 01:53 UTC] ci_pong at hotmail dot com
hi i'm a newbie and i don't have linux installed in my computer. i used wamp to run apache, php and mysql. I was wondering on how to install MDB2 in windows?
[2007-02-14 20:47 UTC] ci_pong at hotmail dot com
hi,
thank you for replying. when i typed pear install --alldeps MDB2_Driver_mysqli, it says "'pear' is not recognized as an internal or external command, operable program or batch file."
I have downloaded MDB2_Driver_mysqli-1.3.0 and MDB2-2.3.0.tgz
could you please help me? thank you very much
[2007-02-15 00:10 UTC] ci_pong at hotmail dot com
Hi,
I got pear working already. But i have another problem
"Call to undefined method MDB2_Error::query()"
could you help me with this error