Is the controller directory derived from index.php or from Front.php?  I
always use absolute paths like
define('APPLICATION_PATH',
              realpath(dirname(__FILE__) . '/../application'))

then controller path APPLICATION_PATH . '/controllers/'


Not sure if this is your issue, but could be.

M



redpaint wrote:
> 
> <p>Hi,</p>
> <p>Quite new to Zend and I cannot get a Hello World script to work.  As
> far as I can tell I have set up the directory structure correctly and I am
> including the Library folder correctly.  When trying to access the test
> site I get an exception:</p>
> <p><code>Fatal error: Uncaught exception
> 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller
> specified (index)' in
> /usr/local/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php:241
> Stack trace: #0
> /usr/local/share/ZendFramework/library/Zend/Controller/Front.php(945):
> Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http),
> Object(Zend_Controller_Response_Http)) #1
> /usr/local/www/vhosts/xxx/subdomains/xxx/httpdocs/index.php(18):
> Zend_Controller_Front-&gt;dispatch() #2 {main} thrown in
> /usr/local/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php
> on line 241</code></p>
> <p>I'm using the following  code in my index.php file:</p>
> <p><code>// Error Reporting
>   error_reporting(E_ALL|E_STRICT);
>   ini_set('display_errors','on');
>   
>   require_once 'Zend/Loader.php';
>   
>   Zend_Loader::loadClass('Zend_Controller_Front');
>   
>   
>   // Get the front controller instance
>   $front = Zend_Controller_Front::getInstance();
>   $front-&gt;setControllerDirectory('../application/controllers');
>   $front-&gt;throwExceptions(true);
>   
>   // GO!
>   $front-&gt;dispatch();</code></p>
> <p>And the following code in IndexController.php</p>
> <code>class IndexController extends Zend_Controller_Action
> {
>     public function indexAction()
>     {
>     }
> }</code>
> <p>And the following structure:</p>
> <ul>
>   <li>application
>     <ul>
>         <li>controllers
>           <ul>
>               <li>IndexController.php</li>
>           </ul>
>         </li>
>       <li>views</li>
>       <li>models</li>
>     </ul>
>   </li>
>   <li>public
>     <ul>
>         <li>index.php</li>
>       <li>.htaccess</li>
>     </ul>
>   </li>
> </ul>
> <p>Zend Library is included as part of the php.ini file.</p>
> <p>Any idea where I might be going wrong? I should point out that I'm
> testing this on a subdomain e.g. http://subdomain.domain.com, although I'm
> not sure how that would make a difference.</p>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-HELP%21--Invalid-controller-specified-%28index%29--tp23837855p23848441.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to