CakePHP bake stacked by database Config: - cakephp

It's the first time I made a bake through the CakePHP console.
I run the cmd as admin and there is a strange thing that after setting
the database config: (default/test) it is stucked there and I don't know
why.
The environment path is setting up correctly.

Related

Localhost points to different address

I have an app developed with CakePHP and it is working just fine on my local machine. Now, I wanted to develop another app with CakePHP. I installed cake in a different folder, configured vhost and server block and did everything like for the first app. I created an empty app, just basic controller and view and when I type the address for the second app I get the first app!!! Weird thing is that all links are working and when I click I get in browser url like secondapp/companies but the content is firstapp/companies. Once more, the second app is empty, no controllers, views and models, just a basic one. Then I did all that in htdocs, and the same problem occurs (none of the apps wasn't in htdocs, but in folders on E partition).
Can someone please give me some help before I kill myself?
Thank you...
If the problem is not on the database configuration, maybe cache problems ? Try it on a private browser/incognito ?

Cake doesn't not bake all templates

I have created 3 database tables which follows
the CakePHP naming convensions. When I try to bake the code with the following command it generates only 3 files in the 'App/src/Template/Worksheets' which is
'view', 'add' and 'edit'.
i.e bin\cake bake all worksheets
There is no 'index' file being generated, only the ones mentioned above.
When I started developing the app the bake command work flawlessly and generated the 'index' file with no problems at all.
Cake doesn't give any errors in the console and it just runs without baking a template for 'index'.
Is there a way to fix this?
So if you type this command in console, after you have baked all the other views, you can create those which is missing. I.e index.ctp
cake bake template <model> <action>
And for my problem:
bin\cake bake template worksheets index
This works flawlessly.

Error after installing CakePhp in Production setup

guys could somebody please help me out? I have just installed cakephp in my localhost
then I'm already getting errors.
Please check this out for reference screenshot of entire page
There may be a table exist namely 'reservations' in your database for which code is not exist.
Sp please create ReservationController.php in Controller folder as well as its Model in 'Model' Folder.
If you want to access any methods of the RestrictionController you have to create view files accordingly.

cakephp bake console acting weird?

I'm pretty new to CakePHP and i'm running through both the Cake Book and the Apress Book CakePHP from novice to professional, but i can't seem to understand what's going on on my bake console.
I've got it installed and seems to work fine. But when i type in cake bake it shows me this
Welcome to CakePHP v2.0.0 Console
--------------------------------------------------------------------
App: htdocs
Path: W:\xampp\htdocs\
--------------------------------------------------------------------
What is the path to the project you want to bake?
[W:\xampp\htdocs\myapp] >
instead of what the books say it should be
---------------------------------------------------------------
App : app
Path: /path-to/project/app
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
>
if i follow the questions on my cake console, it asks me the path to the directory layout i wish to copy, and then seems to override everything i have with that skel one.
on the other hand, if i follow the book's steps and type cake bake view or cake bake model it seems to understand that i'm talking about projects named view and model and tell me there's no database configuration for those projects, etc. So, if i type the project path first, i don't get to choose what to do. But if i leave it out, it has no way of knowing. See where this is going?
I'm using the regular Windows cmd.exe, not cygwin as i've seen some people recommending, and can provide more detail if needed. There's probably an easy solution for this, so I appreciate your help!
you are in the wrong path.
If you want to bake internal stuff (models, controllers, views, ...) etc
you need to navigate to the app folder and execute cake there
(or define your app path with -app)
details and hot tip for windows:
http://www.dereuromark.de/tag/cake-console-windows/

Cakephp: cannot login if using a theme

I am not a newbie cakephp developer however I won't call myself as an intermediate level cakephp programmer.
I came across a strange behavor what I could not handle.
I've build up an app with default views. First customer needs themeing so I decided to use the cakephp theme feature and started to make a theme with views, layouts etc.
I am using cakephp 1.3.8.
Everything works fine except I can't log in. Cakephp redirects me to an impossible place, the search controller with search results. It simply could not happen.
With the default views everything works fine.
What could be the reason? Could it be a bug in Auth component? Where should I start to debug this and how?
Thanks.
edit:
I made a copy of my default views into a new theme, and changed the $theme variable to this new theme. Everything works, so Auth and Theme facilities are fine, the reason should be my first theme. How a theme, or view file affects on login processing and/or Auth redirections? I still do not know how to find the bug in my views :(. I've set debug to 2, also checked the logs in tmp/logs but there ares now infos. Any idea?
SOLVED
I found the problem, a $this->Form->end() was missing from the searchbox element so the login data was submitted to the products controller search method, therefore the login wasn't processed.
Was my fault.

Resources