I have apache, php, and Mysql installed on my computer. I have added the PHP directory and C:\Apache\htdocs\cake\cake\console to my environmental variables path. When i load the path to the console on my CLI it loads cake.php then i type cake bake and it asks me for the path of my app, then database config. Now instead o f it loading the DMVC... menu it just returns to set the path and database and its like a loop. not sure what i am doing wrong.
All help appreciated
Thanks
Joe
Try cd'ing to your app's directory, and then run ../cake/console/cake bake
Try editing your path to C:\wamp\bin\php\php5.4.3; (I used the Wamp server, that's why mine is like that).
Related
I'm new to CakePHP and my employer asked me to move our CakePHP app from a dedicated server to another server (for testing purposes). I've copied all the files, changed app's database.php config but I'm getting a ERR_TOO_MANY_REDIRECTS when accessing the app on the new server.
I did not work on the app so I don't know much about it, but I have all the files.
LE: So, I've uploaded the app on a fresh install of CakePHP. I now have 3 .htaccess files, CakePHP says it's working, but when I try to upload DebugKit (following the install notes & having the proper version for CakePHP 2.4.3.) I get the ERR_TOO_MANY_REDIRECTS.
A look in Chrome's console shows me this. If I delete the DebugKit altogether, the page looks like this & it also has the footer from the app.
The new structure of the app is the standard one.
Please advise!
Best guess is the (apache?) DocumentRoot setting may be clashing with your APP config on the new server and/or the PHP settings. Have you checked your php.ini on the new server? What's the output of phpinfo() ? Once fixed HIGHLY RECOMMEND check other environment variables by turning on the DEBUG flag in config/app.php For your version try pr(Debugger::trace()); or even better for dev. install the Debug kit. Anyway, DocumentRoot should be set to webroot (assuming default install and directory structure).
I've trying to get the CakePHP console running, reading and watching as many tutorials as I can find but to no avail. I got the latest realese of Cake from their Git, 3.08 in this case, because the composer instalation wasn't working I had to manually configure everyhing and so far so good.
The problem is that I cannot for the life of me find the cake console, much of the tutorial I find make reference to a lib, app or console folder.
The only thing that resembles what I've seen in tutorial is on the bin folder, where a cake.php, cake.bat and cake file reside, there is no console folder there though, no exceptions etc, using the file finder for console turns out like 10 result but none with the cake.bat and these other files together.
I know this must be a very dumb question but what I am doing wrong? I already added the bin folder, PHP and mySQL root to my PATH yet typing cake on the console does nothing, not even a error code.
Adding to path as ;C:\wamp\www\cake\bin
Any help would be great.
You can run it like this:
cd \wamp\www\cake
bin\cake
To try to fix your problem type PATH in your console to see if bake was added.
If you haven't reboot you can run
SET PATH=%PATH%;C:\CmdShortcuts
Or simply reboot and try again after adding it to PATH.
Check this:
Update Windows Path
Install Cakephp Console Windows
This happened to me too, when I started on cakephp, I really pain in the *** , anyway, this is the correct path
C:\wamp\www\cake\lib\Cake\Console;
That keeps working for me .
Hi i follow the migrion guide for cakephp 2.0 from thier site in order to update my site framework from 1.3 to 2.0 , but the command
cake upgrade all
doing nothhing . it dont change the name of any files when i run the command i get the following out put
Welcome to CakePHP v2.0.0 Console
---------------------------------------------------------------
App : Console
Path: C:\xampp\htdocs\cakephp-2.0.0\app\Console\
---------------------------------------------------------------
Running tests
Running locations
Running i18n
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running helpers
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running basics
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running request
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running configure
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running constants
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
Running components
Done updating C:\xampp\htdocs\cakephp-2.0.0\app\Console\cake.php
NOTE Also when i open cake console i get this out put
Welcome to CakePHP v2.0.0 Console
---------------------------------------------------------------
App : Console
Path: C:\xampp\htdocs\cakephp-2.0.0\app\Console\
---------------------------------------------------------------
Current Paths:
-app: Console
-working: C:\xampp\htdocs\cakephp-2.0.0\app\Console
-root: C:\xampp\htdocs\cakephp-2.0.0\app
-core: C:\xampp\htdocs\cakephp-2.0.0\lib
Changing Paths:
Your working path should be the same as your application path to change your pat
h use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
Is it be working path issue or i am missing something? Any help will be appreciated.
Thanks to #mark for pointing me in right direction , for future readers
The issue i was in wrong folder . and i was running command like cd Console/cake (the worng way)
RIGHT WAY
Fow linux or mac users after opening your app folder in CMD run the command.
./Console/cake upgrade all
Fow windows users after opening your app folder in CMD run the command.
.\Console\cake upgrade all
Can someone tell me the exact steps to follow on how to do this. the documentation on the cakephp site isnt very helpfull.
I have a clean vanilla copy of cake 2.0.1 on d:\cake201.
I have added the console path in this dir to my PATH var
the project is in d:\www\sbm\trunk\
when navigate to d:\www\sbm\trunk\ in command prompt and run cake upgrade all it modifies the d:\www\sbm\trunk\cake folder and files in there have syntax errors.
when i navigate to d:\www\sbm\trunk\app and run cake upgrade all it looks for the d:\www\sbm\trunk\cake\bootstrap.php but in v2 the cake folder is in d:\www\sbm\trunk\lib\cake
please help
I believe you need to have a copy of your App Folder into the D:\cake201 folder. Now navigate to d:\cake201\app and run cake upgrade all
This should do everything for you ! :)
NOTE: Try not to take the config folder with u and edit that manually, this will be much more easier
I've downloaded a project from a root server. It acts there very fine. But when i run the project in the localhost on xampp environment, didn't find the any css nor any images. How can i solve this problem?
You should also verify the contents of your .htaccess files in the root install directory, in /app and /app/webroot. Depending if you are serving CakePHP from a subdirectory (like http://domain.com/somesubdirectory/) you might have to add a RewriteBase directive to your .htaccess file in /app/webroot/. Details here.
Check the permissions of the /app/webroot/css and /app/webroot/img folders. Also check if you have mod_rewrite properly configured.
Check out this tutorial which talks about mod_rewrite:
link text
"Occasionally a new user will run in to mod_rewrite issues, so I'll mention them marginally here. If the CakePHP welcome page looks a little funny (no images or css styles), it probably means mod_rewrite isn't functioning on your system. Here are some tips to help get you up and running: ..."