开发者

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.mo开发者_开发知识库duleDirectory = 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


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.


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜