Hi now i am banging my had i am workin since from last two days to configure
my zend framework
but it is working only with default controller and default action that is
index as when i give

ur l http:// localhost/myfolder/

it automatically invoks the index action on my IndexController.php class but
when i try to access
any other action with index action it say's page can not be found.

My directory structure is

/myfolder/
 
              /applocation
                     /views
                         /helper
                         /filer
                        /script
                              /index
                                 index.phtml , add.phtml , edit.phtml all
for my three actions
                     /controllers
                     /models
             /library
                 /Zend

            /public
                /script
                /images
                /style
         index.php
         .htaccess

Code which i am using for .htaccess file

RewriteEngine On
RewriteBase /gauravcvs/zendexample
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
php_flag magic_quotes_gpc off

Code which resides in my index.php

error_reporting(E_ALL|E_STRICT);
set_include_path('.' . PATH_SEPARATOR . './library'
. PATH_SEPARATOR . './application/models/'
. PATH_SEPARATOR . get_include_path());

require_once 'Zend/Controller/Front.php';
require_once 'Zend/Controller/Router/Route.php';
$_SERVER['PHP_SELF'] = substr($_SERVER['PHP_SELF'], 0,
strlen($_SERVER['PHP_SELF']) - @strlen($_SERVER['PATH_INFO'])); 
$baseUrl = substr($_SERVER['PHP_SELF'], 0, -9); // 
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->setBaseUrl($baseUrl);
$frontController->setControllerDirectory('./application/controllers');
$frontController->dispatch();

Code of my IndexController.php file

<?php
require_once('Zend/Controller/Action.php');
class IndexController extends Zend_Controller_Action
{
public function init()
{
$this->view->baseUrl = $this->_request->getBaseUrl();

}
public function indexAction()
{

$this->view->title = "My New Albums";
$this->render();
}
public function addAction()
{
die("add actions...");
$this->view->title = "Add Albums";
$this->render();
}


}


It's very urgent for me to configure it any suggestion and help would be
appriciated

With Regards
Gaurav Mudgil
-- 
View this message in context: 
http://www.nabble.com/my-Zend-Framework-configuration-is-not-working-tf3965343s16154.html#a11254430
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to