Search code examples
zend-frameworkzend-tool

Zend Framework - Zend Tool - Module error: I have error after I create module with Zend Tool


I'm new to the zend framework.

I created a zend project with zend tool, and its works. I then tried creating a module, but when I try to access it with a browser, I get an error.

My steps:

  1. $ sudo zf create project mystore
  2. put Zend library inside library

test: http://localhost/mystore/public/ (working)

Add module store (not working)

  1. $ sudo zf create module store
  2. add to application.ini path to modules

    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

    resources.modules = ""

test1: http://localhost/mystore/public/store/

test2: http://localhost/mystore/public/store/public/

test3: http://localhost/mystore/public/modules/store/public/

test1+2+3 result:

An error occurred
Page not found
Exception information:

Message: Invalid controller specified (index.php)
Stack trace:

#0 /var/www/mystore/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/mystore/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /var/www/mystore/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/mystore/public/index.php(25): Zend_Application->run()
#4 {main}  

Request Parameters:

array (
  'module' => 'store',
  'controller' => 'index.php',
  'action' => 'index',
)  

Thanks,

Yosef


Solution

  • I forget to make this command that create index controller of my module.

    $ sudo zf create controller index index-action-included=1 store