Jump to content

[SOLVED] CakePHP (version 1.2.4.8284) : How to generate files form Console/ Bake.php ??


suresh64633

Recommended Posts

You first need to have the cake console in your system path.  To edit your path, you need to open System Properties.  Depends on which version of windows you are running.  Typically, right click My Computer and click properties.  If you are vista or 7, you need to then click Advanced System settings.  In System Properties, click the Advanced tab.  Open "Environment Variables" and locate "Path".  Edit the path to include the cake console directory. So you may have something like:

 

...;C:\cake\console

 

If you have cake in your C:\cake directory, edit as necessary.

 

You may have to reboot, test by opening the command prompt and typing cake bake.  The easiest option is to navigate to your app directory and run cake bake, so you don't have to direct it to your app.

 

That should really be all there is to it.

Link to post
Share on other sites

I set the Environment Variables (variable Name: console AND variable value ='C:\wamp\www\cake\cake\console') and restart my PC.

 

And run following command on DOS prompt.I am getting this error.

 

C:\wamp\php>php c:/wamp/www/cake/cake/console/libs/bake.php

 

Fatal error: Class 'Shell' not found in C:\wamp\www\cake\cake\console\libs\bake.

php on line 36

 

C:\wamp\php>

Link to post
Share on other sites

FYI

 

C:\wamp\php>php c:/wamp/www/cake/cake/console/cake.php

 

Welcome to CakePHP v1.2.4.8284 Console

---------------------------------------------------------------

Current Paths:

-app: app

-working: C:\wamp\www\cake\app

-root: C:\wamp\www\cake

-core: C:\wamp\www\cake

 

Changing Paths:

your working path should be the same as your application path

to change your path use the '-app' param.

Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp

 

Available Shells:

 

APP\vendors\shells:

        - none

 

ROOT\vendors\shells:

        - none

 

CORE\console\libs:

        acl

        api

        bake

        console

        i18n

        schema

        testsuite

 

To run a command, type 'cake shell_name [args]'

To get help on a specific command, type 'cake shell_name help'

 

C:\wamp\php>

Link to post
Share on other sites

I set the Environment Variables (variable Name: console AND variable value ='C:\wamp\www\cake\cake\console') and restart my PC.

 

And run following command on DOS prompt.I am getting this error.

 

C:\wamp\php>php c:/wamp/www/cake/cake/console/libs/bake.php

 

Fatal error: Class 'Shell' not found in C:\wamp\www\cake\cake\console\libs\bake.

php on line 36

 

C:\wamp\php>

 

Then you did not follow directions.  You have to edit your path variable, not create a new one.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.