views:

221

answers:

2

Hi,

I new in zend framework.

I create zend project with zend tool and its works , but i create module and when i try access him with browser I get Error.

I write my steps, please help me.

Thanks,

Yosef

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',
)  
+1  A: 

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.

Dean
Their are working before i add the module.Also now the http://localhost/mystore/public/ works.
Yosef
+1  A: 

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

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