Hi,
I hope this is in the correct area, but feel free to move the post if it has been wrongly posted!
I'm new to the framework and I'm getting some problems with my bootstrapper I think it was.
|
|- public
|-index.php
|-.htaccess
|-library
|- Zend
|-application
|-model
| - application
|-controller
|-model
|-view
Okay. I hope thats a bit clear but thats my current map structure. As you can see I don't have a controller or view defined yet. I was following a .flv movie that did it step by step and I can't really see whats wrong.
The content of the .htacces file is very basic at the moment
Code:
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
When I load the index.php file
Code:
<?php
// Error Reporting
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 'on');
//Modify include path to include path to library
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 instance
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory('../application/controller');
$front->throwExceptions(true);
// GO (run)
$front-> dispatch();
?>
I get a fatal error message (which is normal). This error message says I don't have an indexcontroller.
Code:
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with
message 'Invalid controller specified (index)' in
C:\xampp\htdocs\Testframework\library\Zend\Controller\Dispatcher\Standard.php:249 Stack trace: #0
C:\xampp\htdocs\Testframework\library\Zend\Controller\Front.php(914):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1
C:\xampp\htdocs\Testframework\public\index.php(24): Zend_Controller_Front->dispatch() #2 {main} thrown in
C:\xampp\htdocs\Testframework\library\Zend\Controller\Dispatcher\Standard.php on line 249
My problem is the following.
In the movie tutorial the say that the link works as follows
http://localhost/public/controller/action
so if i should type anything else behind that line. I should get the error message that the specified controller doesn't exist. The error I'm getting is a 404 error "Object not found".
Does anybody know how I could solve this?
A configuration error in apache? or something I forgot to include in my index.php?
Hopefully somebody could help me solve this.