1
votes

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??

1
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 issueJacob
did you try to see what the real error? resources.frontController.params.displayExceptions = 0 make it to 1 this may give you the errorThanu
@Thanu Awesome I can see the error now!!BatMUD

1 Answers

2
votes

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.