Zend Kein adapter gefunden für Application_Model_DbTable_Users

Lerne ich die Zend frame work", während man durch ein tutorial lief ich in eine Keine adapter gefunden für Application_Model_DbTable_Users Fehler. Ich kann nicht scheinen, um es herauszufinden.
hier sind meine Klassen

class Application_Model_Register
 {
private $_dbTable;
private $db;

public function __construct()
{
    $this->_dbTable = new Application_Model_DbTable_Users();

        $parameters =array(
                        'host'     => '127.0.0.1',
                        'username' => 'root',
                        'password' => '******',
                        'dbname'   => 'tutblog',
                                                'adapter'  => 'Pdo_Mysql'
                   );
            try {
                $db = Zend_Db::factory('Pdo_Mysql', $parameters);
                $db->getConnection();
                } catch (Zend_Db_Adapter_Exception $e) {

                } catch (Zend_Exception $e) 
 }
 public function createUser($array)
{   var_dump($array);
    $_dbTable = new Application_Model_DbTable_Users();
    $this->_dbTable->insert($array);
    //insert('array') SQL commands-> form zen_db_table_abstract
}

DBtable Benutzer ist Klasse

class Application_Model_DbTable_Users extends Zend_Db_Table_Abstract
{

    protected $_name = 'users';
protected $_primary ='id';
protected $_password= 'password';
}

Anderen Benutzern Klasse ist leer.

IndexController

public function indexAction()
{   
    $register =  new Application_Model_Register();
$register ->createUser(array( 'name' => 'becky',
                      'age'  => 25,
              'password' => 'somepw'
                 )2);*/
}

Meine ini-Datei

[production]
phpSettings.display_startup_errors = 2
phpSettings.display_errors = 2
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

resources.db.params.adapter_ = "PDO_MYSQL"
resources.db.params.host ='localhost'
resources.db.params.dbname ='tutblog'
resources.db.params.username = "root"
resources.db.params.password = "password"
resources.db.isDefaultTableAdapter = true



[staging : production]


phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

resources.db.params.adapter_ = "PDO_MYSQL"
resources.db.params.host ='localhost'
resources.db.params.dbname ='tutblog'
resources.db.params.username = "root"
resources.db.params.password = "password"
resources.db.isDefaultTableAdapter = true

"Ich danke Euch im Voraus, ich weiß wirklich nicht, wo Sie anfangen neu zu Rahmen. Googelte ich versucht, jede Sache, einfach starten Sie das tut, aber ich fühle mich wie krank laufen in dieses problem wieder.

thnx

Message: No adapter found for Application_Model_DbTable_Users

Stack trace:

Fehlercode hier

0 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Db/Table/Abstract.php(739): Zend_Db_Table_Abstract->_setupDatabaseAdapter()
#1 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Db/Table/Abstract.php(268): Zend_Db_Table_Abstract->_setup()
#2 /Applications/XAMPP/xamppfiles/htdocs/webs/zfNewTry/application/models/Register.php(10): Zend_Db_Table_Abstract->__construct()
#3 /Applications/XAMPP/xamppfiles/htdocs/webs/zfNewTry/application/controllers/IndexController.php(15): Application_Model_Register->__construct()
#4 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Controller/Action.php(513): IndexController->indexAction()
#5 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('indexAction')
#6 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#7 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#8 /Applications/XAMPP/xamppfiles/lib/php/pear/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#9 /Applications/XAMPP/xamppfiles/htdocs/webs/zfNewTry/public/index.php(26): Zend_Application->run()
#10 {main}  
Request Parameters:

array (
  'controller' => 'index',
  'action' => 'index',
  'module' => 'default',
)  
zf enable layout to get this template
könnten Sie uns die genaue Fehlermeldung? Ich vermute, dass die mysql_pdo adapter fehlt von der php-installation, so dass es nicht ein ZF-problem
Hey thnx im Voraus für ein Blick,ich habe den Fehler-code. Im nicht sicher, über die pdo-adapter, sondern mysql arbeitet mit allen anderen frameworks... irgendwelche Gedanken? und gibt es einen Weg wie ich überprüfen kann, für die pro-adapter? und dass, wenn seine funktionale

InformationsquelleAutor David Yang Liu | 2012-05-18

Schreibe einen Kommentar