Questions tagged [cakephp-2.1]

This tag relates to the 2.1.x branch of the CakePHP MVC framework.

CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.[1]

The release of CakePHP 2.1 beta was announced on CakePHP official site on 2012-01-23.

The latest CakePHP stable version is 2.1.5 Security Release resolving security issues related to the XML class.

[1] From the CakePHP home page.

1006 questions
7
votes
4 answers

CakePHP keeps logging me out

Recently i have made three Cake Apps and all three share this problem. The config is mostly stock and i use this as the session options. Configure::write('Session', array( 'defaults' => 'php', 'cookie' => 'test' )); After lots of googling…
472084
  • 17,079
  • 10
  • 56
  • 78
6
votes
1 answer

how to Update a field in Cakephp

i am newbie in Cakephp so I feel difficulties to implement the database queries .. what i want is I want to update a mobile Number where email is equal to the one the user has given .. this is the query which i want to implement "Update…
hellosheikh
  • 2,741
  • 8
  • 43
  • 106
6
votes
3 answers

how to add active class in current page in CakePhp

i have a problem similar to this question How to identify active menu link in CakePHP i have a page in my default.ctp file in which i want to add 'active' class on links. how can i identify the current url of the page and then apply the class on…
hellosheikh
  • 2,741
  • 8
  • 43
  • 106
6
votes
6 answers

Best way to implement admin panel in CakePHP

I am trying to move from CodeIgniter to CakePHP and can't figure out the best way to implement an admin panel. In CI I would create two different applications, one for the frontend and one for the admin panel. After Googling around, I have found…
Jatinder Thind
  • 192
  • 1
  • 2
  • 10
6
votes
1 answer

How to find data through foreign key in cakephp?

Product Plan ProductPlan id |name id |name id | product_id | plan_id 1 aplha 1 a 1 1 2 2 bravo 2 b 3 charlie I want to find Product name and…
usii
  • 1,083
  • 1
  • 9
  • 17
6
votes
1 answer

How to pass simple data from controller to view in cakePHP

I get an int value to the controller and I would like to send it to the according view, but i am either passing or accesing it wrong. Here is what I am trying to do: Controller: function send($int = NULL) { $this->set('integer',…
Johhny P
  • 153
  • 1
  • 2
  • 9
6
votes
2 answers

Use 'on duplicate key update' when saving record in CakePHP

My model has 2 unique indexes. The primary key, and an alphanumeric id. I only have the alphanumeric id when updating said record, so I need to add an "on duplicate key update" statement to the save function, but how do I do that? And I do not want…
skerit
  • 17,691
  • 22
  • 92
  • 138
6
votes
3 answers

CakePHP, CGI and mod_rewrite

I have to run my CakePHP 2.1 application in an environment with CGI-PHP and without the ability to declare apache aliases. I want to redirect requests to a subdomain to CakePHP with mod_rewrite, but this doesn't work out. Current setup Webroot is…
bfncs
  • 8,838
  • 4
  • 28
  • 49
6
votes
1 answer

CakePHP custom validation with a variable in the error message

Good afternoon. I have a Model that has a field called "percentage". All similar Models cannot have their percentages add up to more than 100%. Checking for this is handled during validation. I need the validation error message to say how much…
user1449855
  • 835
  • 2
  • 9
  • 14
6
votes
1 answer

Triggering event manually in JS Helper CakePHP

I stuck in a situation. I am using JS Helper. I used the following code. Js->get('#client_id') ->event('change', $this->Js->request(array('action' => '../ajax/get_client_location_and_process'), array('update'…
Arun Jain
  • 5,356
  • 2
  • 27
  • 51
6
votes
2 answers

Disable form security CakePHP

Is it possible to turn of all CakePHP security features for only 1 particular form in a view? So I don't get any hidden fields (tokens) in that form. Thank you, Bart
6
votes
2 answers

CakePHP Defining Constants

I want to include Google API in my app. I want to Define Outh2 Key, Secret Key and Developer Keys as Constants which i can call and use in the App controller. Which is the best place to define the same ?
Harsha M V
  • 50,335
  • 109
  • 326
  • 496
6
votes
1 answer

difference between $this->data and $this->request->data?

In cakephp 2.1 whats the difference between $this->data and $this->request->data?
Ivan Santana
  • 101
  • 1
  • 7
6
votes
2 answers

Cakephp ClassRegistry::init in bootstrap

can I use a model in bootstrap.php to get an array with find() from database ? like this : $Setting = ClassRegistry::init('Setting'); $Settings = $Setting->find('all'); thanks
ali786
  • 142
  • 3
  • 10
5
votes
3 answers

CakePHP 2 $this->Html->script order

I am trying to insert JS files into the view but they are being inserted in the wrong order. In my default.ctp I have this $this->Html->script(array( 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', 'global' ),…
472084
  • 17,079
  • 10
  • 56
  • 78
1
2
3
67 68