Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.4

Bug #7576 Fatal error: Call to undefined method MDB2_Error::setLang()
Submitted: 2006-05-08 08:11 UTC
From: hammam at islamway dot net Assigned: quipo
Status: Bogus Package: Translation2
PHP Version: 5.1.2 OS: winxp
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2009-10-13 20:51 UTC
Package:
Bug Type:
Summary:
From: hammam at islamway dot net
New email:
PHP Version: Package Version: OS:

 

 [2006-05-08 08:11 UTC] hammam at islamway dot net (hamma)
Description: ------------ Fatal error: Call to undefined method MDB2_Error::setLang() in C:\wamp\www\tests\translation.php on line 62 i am using your example: http://pear.php.net/manual/en/package.internationalization.translation2.intro.php

Comments

 [2006-05-08 08:21 UTC] quipo (Lorenzo Alberton)
In the example, error checking was omitted to make the example more concise, but in a real script you have to check for errors after every method call: $tr =& Translation2::factory($driver, $dbinfo, $params); if (PEAR::isError($tr)) { //oops... deal with it }
 [2009-10-13 19:35 UTC] lakiluk60 (Laki Luk)
[...] $driver = 'MDB2'; require_once 'Translation2.php'; $tr =& Translation2::factory($driver, $dbinfo, $params); if (PEAR::isError($tr)) { echo "Error connecting database!"; die($tr->getMessage()); } $tr->setCharset('utf8'); [...] The result is: MDB2 Error: not found
 [2009-10-13 20:41 UTC] lakiluk60 (Laki Luk)
But I don't know what is "not found". If I use later in script $tr->setCharset('utf8'); i have a message like this: Fatal error: Call to undefined method MDB2_Error::setCharset() in E:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 61
 [2009-10-13 20:51 UTC] cweiske (Christian Weiske)
This is not a discussion forum. Please read the FAQ about your "not found" error. http://pear.php.net/manual/en/package.database.mdb2.faq.php Please post further to the pear-general mailing list.