1

New to Zend!!

I have created a Zend projects with 2 modules, 1.defaule and 2.test

Structure

application + |__ Modules |_default controllers IndexController.php ErrorController.php
models views |
_test controllers IndexController.php models views

application.ini

[production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "Application" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.params.displayExceptions = 0 resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = "test" 

Finally in my test/controllers/IndexController.php

class Test_IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { echo "This is Test Index Controller"; } } 

I can access default module with no problems, but when I try

dev.local/test/index

It says Application Error

Any Suggestions why its doing this??

3
  • if you create another action inside of your index controller are you able to access that? Set up public function mainAction() { echo 'hello'; } then try to navigate to that controller. If you can't, you probably have a mod_rewrite issue Commented Feb 6, 2014 at 4:03
  • 1
    did you try to see what the real error? resources.frontController.params.displayExceptions = 0 make it to 1 this may give you the error Commented Feb 6, 2014 at 4:04
  • @Thanu Awesome I can see the error now!! Commented Feb 6, 2014 at 4:12

1 Answer 1

2

First make

resources.frontController.params.displayExceptions = 1 

It will give you the exact error message in the controller, and whats in your views directory in your test module? You need to have a script template file for index action. Just guessing, coz faced similar issue recently.

Sign up to request clarification or add additional context in comments.

1 Comment

Yep thats what it is… This is the exact error Message: script 'index/index.phtml' not found in path (/Development/test-dev/application/modules/test/views/scripts/)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.