Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
salut à tous.
ben vi ça arrive à tout le monde
j'ai changé des serveur et donc de hiérarchie
je suis dans la conf suivante
/(amp directory) | +-...(les dossiers de apache php mysql ...) | +-htdocs (documentRoot) | | | +-ZendApplications | | | +-SimpleContact | | | +-public (contient les images css etc) | | | +-.htaccess | | | +-index.php | +-ZendFramework (le dossier complé fourni dans la livraison de zend) | +- ... (incubator, externals, ...) | +-library | | | +-zend | +-ZendApplications | +-SimpleContact | +-Application | | | +-Controllers | | | +-Models | | | +-views | +-library
je n'ai visiblement pas configuré correctement un include_path ou ma baseurl mais je ne vois pas où
http://localhost/ZendApplications/SimpleContact/index/index/
Dans index.php:58 get_include_path() => Array ( [0] => C:\xampp\ZendFramework\ZendApplications\SimpleContact\library [1] => C:\xampp\ZendFramework\ZendApplications\SimpleContact\Application [2] => . [3] => C:\xampp\ZendFramework\library [4] => C:\xampp\php\pear\ ) Dans Standard.php:238 $request => Zend_Controller_Request_Http Object ( [_paramSources:protected] => Array ( [0] => _GET [1] => _POST ) [_requestUri:protected] => /ZendApplications/SimpleContact/index/index/ [_baseUrl:protected] => /ZendApplications/SimpleContact [_basePath:protected] => [_pathInfo:protected] => /index/index/ [_params:protected] => Array ( [controller] => index [action] => index [module] => default ) [_aliases:protected] => Array ( ) [_dispatched:protected] => 1 [_module:protected] => default [_moduleKey:protected] => module [_controller:protected] => index [_controllerKey:protected] => controller [_action:protected] => index [_actionKey:protected] => action ) * Appel de : Zend_Controller_Dispatcher_Standard::dispatch() dans C:\xampp\ZendFramework\library\Zend\Controller\Front.php:934 * Appel de : Zend_Controller_Front::dispatch() dans C:\xampp\ZendFramework\library\Zend\Controller\Front.php:214 * Appel de : Zend_Controller_Front::run() dans C:\xampp\htdocs\ZendApplications\SimpleContact\index.php:85 Dans Standard.php:215 isDispatchable => String { [] => Application/Controllers\IndexController.php } * Appel de : Zend_Controller_Dispatcher_Standard::isDispatchable() dans C:\xampp\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php:239 * Appel de : Zend_Controller_Dispatcher_Standard::dispatch() dans C:\xampp\ZendFramework\library\Zend\Controller\Front.php:934 * Appel de : Zend_Controller_Front::dispatch() dans C:\xampp\ZendFramework\library\Zend\Controller\Front.php:214 * Appel de : Zend_Controller_Front::run() dans C:\xampp\htdocs\ZendApplications\SimpleContact\index.php:85 Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (index)' in C:\xampp\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php:243 Stack trace: #0 C:\xampp\ZendFramework\library\Zend\Controller\Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\xampp\ZendFramework\library\Zend\Controller\Front.php(214): Zend_Controller_Front->dispatch() #2 C:\xampp\htdocs\ZendApplications\SimpleContact\index.php(85): Zend_Controller_Front::run('Application/Con...') #3 {main} thrown in C:\xampp\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php on line 243
mon dossier application est bien dans le path : C:\xampp\ZendFramework\ZendApplications\SimpleContact\Application
mon baseurl semble correct puisqu'il trouve bien default index et index pour la requête
mais il ne trouve pas le contrôleur indexControler qui pourtant est bien dans le dossier
si je regarde dans le dispatcher il cherche à faire un fopen sur Application/Controllers\IndexController.php
et ne parvient pas à le faire.
j'ai bricolé le truc pour trouver passer cette exception et je suis tombé sur une erreur encore plus étrange
lorsque Zend teste l'existence du script pour la vue il fait un appel à is_readable en lui donnant le chemin partiel de la vue soit views/scripts/index/index.phtml. cette méthode retourne faut même si le fichier peut être lu
j'ai fais in include du fichier juste avant le is_readable et le fichier est bien lu
A+jyt
Hors ligne
sekaijin a écrit:
mon dossier application est bien dans le path : C:\xampp\ZendFramework\ZendApplications\SimpleContact\Application
mon baseurl semble correct puisqu'il trouve bien default index et index pour la requête
mais il ne trouve pas le contrôleur indexControler qui pourtant est bien dans le dossier
si je regarde dans le dispatcher il cherche à faire un fopen sur Application/Controllers\IndexController.php
et ne parvient pas à le faire.
Juste comme ça ton IndexController a bien 2 'L', car ci-dessus tu as marqué indexControler avec un seul 'L' ?
Ca m'étonnerait que ce soit cela, mais parfois à force d'avoir les yeux dessus on ne fait plus attention...
Sinon, tu peux nous montrer l'arbo complète sous les dossiers 'Controllers', 'Models', 'Views' ?
++
Fred
Hors ligne
+-ZendFramework (le dossier complé fourni dans la livraison de zend) | +- ... (incubator, externals, ...) | +-library | | | +-zend | +-ZendApplications | +-SimpleApp | +-Application | | | +-Controllers | | | | | +-IndexController.php | | | +-Models | | | +-views | | | +-scripts | | | +-index | | | +-index.phtml | +-library
Hors ligne
Ok, et que dit ton .htaccess ?
Hors ligne
je ne vois pas le rapport avec mon .htaccess
le truc me charge bien le front_controller et tout le bazar
et mon dossier Application est dans le path
il n'y a rien dans mon .htaccess si ce n'est le RewriteRule vers index.php
A+JYT
Hors ligne
Oui en effet, tu as raison....
La seule chose que je verrai c'est peut être un conflit entre tes deux dossiers ZendApplications portant le même nom, voir leur sous-dossier SimpleContact (identiques également). Peut être cherche t-il le controller index au niveau du ZendApplications/SimpleContact contenant le index.php et .htaccess.
J'ai déjà eu un problème un peu similaire avec une notion de module de module et leur définition via addModuleDirectory (qui fonctionne en mode LIFO). Dans ces 'sous-modules', j'avais des controllers qui portaient le même nom. Du coup, il me cherchait un controller mais dans le mauvais module...
Sinon, si cela ne vient pas de cela, je ne vois pas ce qui ne fonctionne pas. Personne d'autres n'a d'idée ?
Cordialement,
Fred
Dernière modification par elkolonel (03-04-2009 14:01:26)
Hors ligne
merci
j'étais parti d'un développement fait en 1.0.4 et en changeant de serveur wamp => Xamp je j'en ai profité pour changer d'architecture et de version de ZF
du coup je me demande si reprendre mon bootstrap est une bonne idée en refaire un autre serait peut-^tre plus simple
A+JYT
Hors ligne
Et au final, le problème venait de cela ??
Hors ligne