Thursday, April 1, 2010

Zend Framework

When I got this error

Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (zf-tutorial)' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Dispatcher\Standard.php:242 Stack trace: #0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\index.php(42): Zend_Controller_Front->dispatch() #2 {main} thrown in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Dispatcher\Standard.php on line 242



I had to add php_pdo.dll and php_pdo_mysql.dll in the phpi.ini as extensions

Also, I had to correct the DB name in applications/config.ini

The db name that I intended to use was zf_test, so I had to check if this was created correctly in mysql - as well as the entry in the config.ini

---
Problem:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (zf-tutorial)' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Dispatcher\Standard.php:242 Stack trace: #0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\index.php(43): Zend_Controller_Front->dispatch() #2 {main} thrown in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zf-tutorial\library\Zend\Controller\Dispatcher\Standard.php on line 242


TroubleShoot:

I added this in the
$frontController->setParam ('useDefaultControllerAlways', true );

after this I was able to go to http://.../zf-tutorial/index.php

2 comments:

  1. I installed the latest version of zend 1.10
    and used this tutorial to configure a Zend Frame work -
    http://akrabat.com/zend-framework-tutorial/

    After installation - I found the above errors and have described how I was able to resolve it.

    ReplyDelete
  2. hey kirsn i have solution for zend technology.
    use zend with cloud technology. it really help you out in speed wise.And collecting data fast and data base query execution will be more fast with hybrid cloud technology.Also migrate your existing application into the Cloud quickly and easily.

    ReplyDelete