Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
Bonjour, je suis en train de suivre le tutoriel de Thorin19 ici :
http://www.throrinstudio.com/blog/index … article/51
Seulement lorsque je lance "php Doctrine.php"
Je me retrouve toujours avec cette erreur
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é :
[lang=php]protected static function _initNamespaces() { $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('App_'); $autoloader->registerNamespace('Doctrine_'); $autoloader->registerNamespace('Doctrine'); }
dans le bootstrap.
Dernière modification par kai23 (04-05-2011 16:30:58)
Hors ligne
ton erreur vient d'une mauvaise configuration de connexion à ta base et non de la library. Sinon il te dirai que la classe Doctrine_Connection_Exception n'existe pas.
Hors ligne
Hello Thorin, et merci de ta réponse.
Mais je ne vois pas où je dois changer quelque chose ? Ma base est la bonne, j'ai suivi ton tuto à la lettre (il me semble)
Hors ligne