Question

A similar question has been asked before but solution to that didn't help me. I created a file "dave.php" in application/classes/Controller/ folder and I renamed the controller as well. Here's the code in dave.php file:

<?php defined('SYSPATH') OR die('No Direct Script Access');

Class Controller_Dave extends Controller
{
public function action_index()
{
    echo 'hello, world!';
}
}

kohana/index.php/dave - but I am still geting that error. Any ideas why?

Was it helpful?

Solution

It seems that you use Kohana 3.3, so the file name should be Dave.php not dave.php

OTHER TIPS

That is my htaccess

RewriteEngine On

RewriteBase /

RewriteRule ^(application|modules|system) - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [PT,L]

Check, is apache mod_rewrite enable and loaded at phpinfo(); In My case I've just enable mod_rewrite at apache.

 sudo a2enmod rewrite 

and than restart

sudo systemctl restart apache2

Check .htaccess rules.

And note, that Controllers names are case sensitivity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top