suresh64633 Posted September 21, 2009 Share Posted September 21, 2009 Hi ALL I am new in CakePHP and want to generate files from console in windows platform. I have WAMP in C:/wamp/www/. Please help me to generate files form DOS Prompt. Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/ Share on other sites More sharing options...
jcombs_31 Posted September 21, 2009 Share Posted September 21, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/#findComment-922210 Share on other sites More sharing options...
suresh64633 Posted September 21, 2009 Author Share Posted September 21, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/#findComment-922282 Share on other sites More sharing options...
suresh64633 Posted September 21, 2009 Author Share Posted September 21, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/#findComment-922297 Share on other sites More sharing options...
suresh64633 Posted September 21, 2009 Author Share Posted September 21, 2009 Thanks buddy Now it is working!! Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/#findComment-922307 Share on other sites More sharing options...
jcombs_31 Posted September 21, 2009 Share Posted September 21, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/174973-solved-cakephp-version-1248284-how-to-generate-files-form-console-bakephp/#findComment-922308 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.