Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2008, 10:08 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default Bootstrap problems

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.

Last edited by Filip : 04-01-2008 at 10:52 AM. Reason: typo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-01-2008, 11:57 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default

Okay, so I think I found out what to do.
I made a virtual host with something I found on the internet
[code]
<VirtualHost Localhost:80>
DocumentRoot "PHYSICAL_PATH_TO_ROOT_FOLDER"

ServerName COMPUTER_NAME
RewriteEngine off

<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar \.gz)$ /index.php

</Location>
</VirtualHost>
[code]
after I did this it rewrote the URL's correctly and gave the correct errors.

I don't know if this might help somebody or if it's even clear at all

Last edited by Filip : 04-01-2008 at 11:57 AM. Reason: added code tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:09 PM.