Problems creating shell in cakephp 2

161 views Asked by At

I've been following this to create a shell. But I am getting 2 different errors.

Number 1:

I added a HelloShell.php file inside this path

C:\xampp\htdocs\digesto\lib\Cake\Console\Command

The HelloShell.php contains the following code

class HelloShell extends AppShell {

    public $uses = array('Norm');

    public function show() {
        $norm = $this->Norm->find('first');
        $this->out(print_r($norm, true));
    }
}

And i get this error while running /Console/cake hello show

Error: Class 'AppModel' not found

Number 2:

I added a HelloShell.php file inside this path

C:\xampp\htdocs\digesto\app\Console\Command

Using the same code ase above and I get the following error

Error: Plugin Hello could not be found

What am I doing wrong?

1

There are 1 answers

0
Glexnor On

So far the answer for this question seems to work.

CakePhp 2.4 "Error: Shell class HelloShell could not be found." Paths mess?

Will update if not.