Zend FR

Consultez la FAQ sur le ZF avant de poster une question

Vous n'êtes pas identifié.

#1 02-04-2008 15:15:07

shadockou
Nouveau membre
Date d'inscription: 02-04-2008
Messages: 2

(débutant) Installation de zend framework : Uncaught exception.

Bonjour je suis entrain de suivre le tuto de kitpages dans lequel j'ai déjà du modifier
le .htaccess suite à des erreurs 404 récurrentes.
M'étant débarrasser des erreurs 404 voici maintenant le message d'erreur que je reçois :

Code:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (raining)' in /home/leray/public_html/zend_framework/library/Zend/Controller/Dispatcher/Standard.php:249 Stack trace: #0 /home/leray/public_html/zend_framework/library/Zend/Controller/Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /home/leray/public_html/zend_training/index.php(41): Zend_Controller_Front->dispatch() #2 {main} thrown in /home/leray/public_html/zend_framework/library/Zend/Controller/Dispatcher/Standard.php on line 249

Débutant totalement sur zend_framework j'ai bien du mal à analyser ce message d'erreurs.
Voici ma configuration :
Apache2, php5 en local sur distribution linux Ubuntu, le mode rewrite est activé.

Pour l'arborescence j'ai suivi strictement les indications de kitapages, et voici mon index.php

Code:

<?php
// mettre vos constantes ici...
define("WEBAPP_DIR","/home/leray/public_html/zend_training");
define("MODEL_DIR",WEBAPP_DIR."/PHP-INF");
define("ROOT_URL","http://localhost/~leray/zend_training/");
define("BASE_URL","/zend_training/");
define("ZEND_FRAMEWORK_DIR","../zend_framework/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");

//Zend_View init
Zend_Loader::loadCLass('Zend_View');

// 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
$view = new Zend_View();
$viewRenderer = Zend_Controller_Action_HelperBroker::
    getStaticHelper('viewRenderer');
$viewRenderer->setView($view)
             ->setViewSuffix('phtml');
 
// call dispatcher
$controller->dispatch();
?>

le .htaccess :

Code:

  RewriteEngine on
  RewriteBase /zend_training
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /zend_training/index.php [L]

Si quelqu'un pouvait m'aider à comprendre où ça cloche..

Merci d'avance.

Hors ligne

 

#2 02-04-2008 16:57:47

Mr.MoOx
Administrateur
Lieu: Toulouse
Date d'inscription: 27-03-2007
Messages: 1444
Site web

Re: (débutant) Installation de zend framework : Uncaught exception.

Ca define("BASE_URL","/zend_training/"); n'est pas bon.
Tu dois avoir la base de puis le domaine donc dans ton cas: "/~leray/zend_training/".
Le message d'erreur bizarre contient "raining" mais pas sans raison...
strlen(/~leray/zend_t) == strlen(/zend_training/) wink

Hors ligne

 

#3 02-04-2008 17:08:51

shadockou
Nouveau membre
Date d'inscription: 02-04-2008
Messages: 2

Re: (débutant) Installation de zend framework : Uncaught exception.

Aaaah super c'était effectivement là d'où venait le problème.
Merci à toi.

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr

Graphisme réalisé par l'agence Rodolphe Eveilleau
Développement par Kitpages