Reputation: 136
I'm running a Zend Framework app on my.phpcloud.com (so server configs should be ok...)
The index page works fine, I modified application/controllers/IndexController.php like this:
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->assign('hello', 'hello world!');
}
}
in application/views/scripts/index/index.phtml I print $this->hello and everything works fine.
But if I create a new controller like application/controllers/UserController.php
class UserController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->assign('name', 'Albert');
}
}
I created the view in application/views/scripts/user/index.phtml and I print $this->name as I did in the index's view.
But when i visit http://myapp/user
I get a Not Found error...what's the problem?
Upvotes: 1
Views: 82
Reputation: 412
1) Check that the file name for user controller contains first uppercase letter UserController.php (not userController.php)
2) Check .htaccess file for proper rewrite rulles
3) Try http://myapp/User
(User uppercase first letter)
4) Check that default routing is enabled.
5) Do you have error controller created and enabled?
I think that there is some problem in configuration, maybe in your bootstrap or in config.ini
Upvotes: 1