bake

having trouble with cakePHP Bake and one of the database tables

Hi, I am using Bake to create models for my database tables. I have run into a little problem. I have 25 tables .... I strated baking the models until for one of the database tables the bake started giving a name of it own to the model,file and class. For example ,the table in database is named : 'risk_manager' (It has association ...

How can I set up 'bake' with MAMP on OS X with projects in 'Sites'?

I'm trying to set up 'cake bake' on OS X. I'm using MAMP and every time I try to 'bake', I get this: -bash: cake: command not found I have the Apress Beginning CakePHP book, but the suggestions in that book aren't working for me. In the Apress, book, he suggests the following solution in .profile alias cake="php ~/Sites/blog/cake/con...

problem baking view in cakephp

I've created a custom view template (see link below), which I'm using to bake my views in cakephp. http://book.cakephp.org/view/789/Modify-default-HTML-produced-by-baked-templates Everything works fine, but if I try to incorporate an element in my view template, such as <?php echo $this->element('menu'); ?> I get an error while baki...

CakePHP 1.3 (newest), fatal error while baking views

I've just downloaded the newest beta of CakePHP 1.3 for a new project (not a serious one, so no worries with the beta, still learning stuff, I'm right now trying to get grip on acl/auth). I've baked model and controllers for four databases, but baking a view results in a fatal error: Fatal error: Call to a member function on a non-obje...

CakePHP, Set "cake" Environment Variable?

Here's a quickie that I assume has a simple answer (maybe? Hopefully?), but I just can't find one: I'm using the "cake" console in cakephp on Mac OS X 10.6.2. How do I set up the environment variable (or PATH?) so that all I need to type in terminal is "cake"... as opposed to the full path to the console app? I'm unabashedly a newb wh...

cakephp bake view Errors

I have previously baked a controller for a model that I have created. When attempting to bake the view using cakephp I get the following errors: Interactive Bake Shell --------------------------------------------------------------- [D]atabase Configuration [M]odel [V]iew [C]ontroller [P]roject [Q]uit What would you like to Bake? (D/M/V...

cakephp baking in windows 7

Hi, I'm new to cakephp so have just been working through the cookbook and am now working through "Beginning CakePHP from Novice to Professional" by Apress. I have got to the Bake section of the book but I can't seem to get it working in windows 7. I have added the path to my "Environment Variables" so I don't have to navigate to the lo...

CakePHP one to many Combo box

Hey I have two models User and City, where a user belongs to a city and a city has many users. On the city table I have city_id and city_name. I've used used cake bake and created the user model and when I add a new user the combos box under the city field is showing the id of the city instead of the name. I've tried several methods to...

Parse error: syntax error, unexpected T_STRING While Cake Bake Model

I'm getting Parse error: syntax error, unexpected T_STRING while i cake bake model because the model generated has single quotes not closed like ' Photo' => array( 'className' => 'Photo', 'foreignKey' => 'album_id', 'dependent' => false, 'conditions' => ', 'fields' =...

find the user who is trying to create a directory

Hello I am using cakePHP's bake console to create a cakePHP application. But when I run the scripts, it says that the present user does not have permission to create a folder in the directory. So to find out the user who is being denied, I echoed whoami from the PHP script, and got the user. Now I made that user the owner of the director...

CakePHP: -bash: cake: command not found

Hi, I've used CakePHP a few times before but this is the first time I'm trying out Bake. On my Mac I'm running CakePHP 1.3, PHP5.3.3, and MySQL. I've created my database tables and the app connects to the database. I navigate to the console folder. and type ./cake I get welcome to the CakePHP v.1.3.5 Console. Then I gives me a list o...