Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
Pages: 1
Bonjour,
Je suis tout nouveau dans l'univers de PHP et de ZF. J'essaie de realiser le screencast present sur le site framework.zend.com
je pense avoir un pb avec ma config apache. Dans le screencast 2, on ecrit le fichier d'index :
<?php
// Error reporting
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 'on');
// Modify include path in order to includes Zend libraries
ini_set('include_path', ini_get('include_path'). PATH_SEPARATOR . '../library' );
// Zend framework Includes
require_once "Zend/Loader.php";
Zend_Loader::loadClass('Zend_Controller_Front');
// get the front controller
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory('../application/controllers');
$front->throwExceptions(true);
// dispatch requests to the different controllers
$front->dispatch();
?>
dans mon browser je vais sur http://demo_app et mon browser me retourne bien :
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (index)' in C:\Program Files\Zend\Apache2\htdocs\library\Zend\Controller\Dispatcher\Standard.php:241 Stack trace: #0 C:\Program Files\Zend\Apache2\htdocs\library\Zend\Controller\Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files\Zend\Apache2\htdocs\demo_app\index.php(22): Zend_Controller_Front->dispatch() #2 {main} thrown in C:\Program Files\Zend\Apache2\htdocs\library\Zend\Controller\Dispatcher\Standard.php on line 241
Maintenant si j'essaie d'acceder un controlleur qui n'existe pas, genre http://demo_app/signup j'obtiens :
Not Found
The requested URL /demo_app/signup was not found on this server.
Au lieu d'avoir une erreur fatale me disant que le controlleur signup n existe pas.
J ai bien cree le fichier .htaccess et je charge bien le mod_rewrite dans mon httpd.conf
Pouvez-vous m'aider ?
Dernière modification par bulldog (23-10-2008 19:22:26)
Hors ligne
j ai modifie ma conf apache, j avais la conf suivante :
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>
Je n avais pas vu que je devais updater AllowOverride pour mon documentRoot.
Desole de vous avoir derange.
Hors ligne
Pages: 1