Intégration Doctrine dans Zend
Bonjour, je suis en train de suivre le tutoriel de Thorin19 ici :
http://www.throrinstudio.com/blog/in...e/idarticle/51
Seulement lorsque je lance "php Doctrine.php"
Je me retrouve toujours avec cette erreur
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| c:\wamp\www\tutosite.com\application\scripts>php Doctrine.php
PHP Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with messag
e 'There is no open connection' in C:\wamp\www\tutosite.com\library\Doctrine\Man
ager.php:662
Stack trace:
#0 C:\wamp\www\tutosite.com\library\Doctrine\Manager.php(264): Doctrine_Manager-
>getCurrentConnection()
#1 C:\wamp\www\tutosite.com\application\Bootstrap.php(98): Doctrine_Manager::con
nection(NULL, 'doctrine')
#2 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(667): Bootstrap->_initDoctrine()
#3 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(627): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('doctr
ine')
#4 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(584): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('doctrine')
#5 C:\wamp\www\tutosite.com\application\scripts\Doctrine.php(31): Zend_Applicati
on_Bootstrap_BootstrapAbstract->bootstrap('doctrine')
#6 {main}
thrown in C:\wamp\www\tutosite.com\library\Doctrine\Manager.php on line 662
Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'Th
ere is no open connection' in C:\wamp\www\tutosite.com\library\Doctrine\Manager.
php:662
Stack trace:
#0 C:\wamp\www\tutosite.com\library\Doctrine\Manager.php(264): Doctrine_Manager-
>getCurrentConnection()
#1 C:\wamp\www\tutosite.com\application\Bootstrap.php(98): Doctrine_Manager::con
nection(NULL, 'doctrine')
#2 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(667): Bootstrap->_initDoctrine()
#3 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(627): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('doctr
ine')
#4 C:\wamp\www\tutosite.com\library\Zend\Application\Bootstrap\BootstrapAbstract
.php(584): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('doctrine')
#5 C:\wamp\www\tutosite.com\application\scripts\Doctrine.php(31): Zend_Applicati
on_Bootstrap_BootstrapAbstract->bootstrap('doctrine')
#6 {main}
thrown in C:\wamp\www\tutosite.com\library\Doctrine\Manager.php on line 662 |
J'ai bien déclaré :
Code:
1 2 3 4 5 6 7
| protected static function _initNamespaces()
{
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('App_');
$autoloader->registerNamespace('Doctrine_');
$autoloader->registerNamespace('Doctrine');
} |
dans le bootstrap.