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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2008, 11:22 PM
Junior Member
 
Join Date: Mar 2008
Posts: 12
Default Newbie, getting error from 'hello world' example

I followed the quick start directions exactly, copied them right out of the examples. But I get an error message that says "Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in /usr/local/apache2/htdocs/testsite.com/Zend/Controller/Dispatcher/Standard.php:198" with a full stack trace following.

Here are the files I created:

index.php
<?php
require_once 'Zend/Controller/Front.php';
Zend_Controller_Front::run ('/application/controllers');
?>

application/controllers/IndexController.php
<?php
require_once 'Zend/Controller/Action.php';
class IndexController extends Zend_Controller_Action
{
public function indexAction () {}
}
?>

application/controllers/ErrorController.php
<?php
require_once 'Zend/Controller/Action.php';
class ErrorController extends Zend_Controller_Action
{
public function errorAction () {}
}
?>

My Zend directory is at the document root, where index.php and the application directory is. I didn't include the views here because they probably aren't causing the problem.

Any help as to why this simple application gives me that error would be much appreciated. I've been looking at the same few lines of code all day and I'm stumped.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-07-2008, 01:52 AM
Junior Member
 
Join Date: Mar 2008
Posts: 12
Default

The problem was the leading / in my call to Zend_Controller_Front::run. The example shows a leading slash, so I copied it that way. When I finally tried removing it, everything worked fine.
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 06:15 AM.