Bonjour,

j'ai trouvé pleins de tutos et de messages récurrents mais je n'arrive pas à résoudre mon problème. J'ai le message :

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (index)' in C:\wamp\www\ZF\ZendFramework-1.10.0\library\Zend\Controller\Dispatcher\Standard.php:241 Stack trace: #0 C:\wamp\www\ZF\ZendFramework-1.10.0\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\wamp\www\ZF\index.php(39): Zend_Controller_Front->dispatch() #2 {main} thrown in C:\wamp\www\ZF\ZendFramework-1.10.0\library\Zend\Controller\Dispatcher\Standard.php on line 241
J'ai vérifié, la structure, le nommage, je vois pas ou est l'erreur.

Ma structure :

ZF /
--WEBAPP_DIR /
------PHP-INF /
----------ctrl /
--------------IndexController.php
----------views /
--------------filters /
--------------helpers /
--------------scripts /
------------------index /
----------------------index.phtml
------index.php
------.htaccess
Mon fichier WEBAPP_DIR/index.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
<?php
// mettre vos constantes ici...
define("WEBAPP_DIR","C:/wamp/www/ZF");
define("MODEL_DIR",WEBAPP_DIR."/PHP-INF");
define("ROOT_URL","http://localhost/ZF");
define("BASE_URL","../ZF/ctrl/");
define("ZEND_FRAMEWORK_DIR","C:/wamp/www/phplib/ZendFramework-1.10.0/library");
 
set_include_path(
  ".".PATH_SEPARATOR.
  MODEL_DIR.PATH_SEPARATOR.
  ZEND_FRAMEWORK_DIR.PATH_SEPARATOR.
  get_include_path()
);
 
require_once 'Zend/Loader.php';
 
// Registry init
Zend_Loader::loadClass("Zend_Registry");
 
// Controller init
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Controller_Router_Rewrite');
$controller = Zend_Controller_Front::getInstance();
 
$controller->setBaseUrl(BASE_URL);
$controller->setControllerDirectory('PHP-INF/ctrl');
$controller->throwExceptions(true);
 
// init viewRenderer
Zend_Loader::loadClass("Zend_View");
$view = new Zend_View();
$viewRenderer = Zend_Controller_Action_HelperBroker::
    getStaticHelper('viewRenderer');
$viewRenderer->setView($view)
             ->setViewSuffix('phtml');
 
// call dispatcher
$controller->dispatch();
?>