0

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

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
Ben
  • 25,389
  • 34
  • 109
  • 165

2 Answers2

1

Do other actions/controllers work on the standard install, the case before you added the module (at the URL http://localhost/mystore/public/)? It might be possible there is something wrong with the rewrite rules in your .htaccess file.

The Routing in Zend seems to think that when you access your module the controller is index.php.

daangemist
  • 113
  • 10
  • Their are working before i add the module. Also now the http://localhost/mystore/public/ works. – Ben Jun 08 '10 at 13:15
1

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

$ sudo zf create controller index index-action-included=1 store
Ben
  • 25,389
  • 34
  • 109
  • 165