Questions tagged [cakephp-2.0]

Questions about the 2.0.x branch of the CakePHP MVC framework. If your question applies to CakePHP in general, use the tag [cakephp].

Use this tag for questions specifically about version 2.0.x of the CakePHP MVC framework. If your question applies to CakePHP more generally, use the tag .

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.

4110 questions
14
votes
7 answers

cakephp 2.0 how to update auth data?

when I update data in the User model, the Auth data is not updated. How can I "refresh" the data which is returned by $this->Auth->user() when I am updating user model ? and I don't want to use $this->Auth->login($data); after updating my user…
AnNaMaLaI
  • 3,966
  • 8
  • 50
  • 91
13
votes
1 answer

Using SQLite3 with CakePHP 2.0

I'm trying to run SQLite3 with CakePHP 2.0 In these questions I saw that it's possible to do that in CakePHP 1.3: - Using Sqlite3 with CakePHP - How do I connect CakePHP to a SQLite database? However, the solutions are not valid for CakePHP 2.0. I…
Paulo Coghi
  • 10,054
  • 11
  • 63
  • 85
13
votes
1 answer

CakePHP: What should go in /Lib vs /Vendor vs /Plugin

I've been using CakePHP for a while and I still don't really understand what should go in /Lib vs /Plugin vs /Vendor. I know that plugins are basically mini apps with their own controllers, etc. But there are many situations when all three seem like…
emersonthis
  • 30,934
  • 52
  • 191
  • 328
13
votes
3 answers

Cakephp auth component with two models session

I have two cakephp2 applications running on same database, but having different Auth tables and different $this->Auth->userModel values accordingly. Authentication works well and users from one app can't log into other. BUT.. as apps uses same…
Jonasson
  • 153
  • 1
  • 7
12
votes
4 answers

CakePHP unable to write to certain files

I am starting to develop a website using CakePHP for my framework, I've literally just started and have already encountered errors, I can't work about what they mean. Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in…
001221
  • 5,535
  • 23
  • 76
  • 132
12
votes
3 answers

Migrating from Cake 1.3 to 2.0 and beyond - migrate existing, or only use for new?

I'm nearling completion of my first CakePHP-driven website and just saw they're already working on CakePHP 2.0 (not the stable release yet). My questions: Is it incredibly time consuming to move to a new version of CakePHP (when it becomes the…
Dave
  • 27,341
  • 18
  • 106
  • 177
12
votes
1 answer

From Rails 3.2 to Cake PHP 2.0. How to do some Rails common tasks?

My intention is not to make comparisons or discuss which framework is better. I know the power from both CakePHP and Rails. I'm sure that there's a way to do similar things in both of them. So, this is the situation: in Rails framework, I'm used to…
Bruno Dias
  • 216
  • 1
  • 7
11
votes
3 answers

Getting associated models with $this->Auth in Cakephp

I am using CakePHP 2.0's integrated Auth component. I have the following tables : Users Groups Profiles My model relations are as follows: User belongsTo Group User hasMany Profiles While logged in to the site, I noticed the Auth session…
AnNaMaLaI
  • 3,966
  • 8
  • 50
  • 91
11
votes
2 answers

How to select subdocuments with MongoDB

I have a collection with a subdocument tags like : Collection News : title (string) tags: [tag1, tag2...] I want to select all the tags who start with a pattern, but returning only the matching tags. I already use a regex but it returns all…
Mush
  • 153
  • 1
  • 1
  • 8
11
votes
4 answers

CakePHP with Bootstrap (from Twitter)

I am new to CakePHP and I want to know a way to use Boostrap from Twitter in layouts combined with cake. My main concern is to make the Form Helper continues to function normally, because I think that it uses pre-configured CSS classes, and if I…
Paulo Coghi
  • 10,054
  • 11
  • 63
  • 85
11
votes
6 answers

cakephp and https redirects

I have a site that has some strict requirements for SEO purposes. The main one is redirecting all http requests to https which I have done by adding this into the AppController: public function forceSSL() { return $this->redirect('https://' .…
djcamo
  • 237
  • 2
  • 3
  • 10
11
votes
1 answer

How do I get a list of all functions inside a controller in cakephp

I needed to select a controller in CakePHP 2.4 and display all the functions written in it. I found how to list controllers from this question & answer thread on Stack Overflow but what I need now is given a specific controller I need to get the…
Scrappy Cocco
  • 1,104
  • 3
  • 17
  • 35
11
votes
6 answers

CakePHP: How to use a view element inside of a controller

I'm trying to figure out how to use one of my view elements inside of a controller... I know, I know: "Don't do that!" (99% of the time this is the correct answer) But I think I actually have a good reason. The action is handling an AJAX request…
emersonthis
  • 30,934
  • 52
  • 191
  • 328
11
votes
3 answers

Way to define cakephp inputDefaults at site level

Is there a way to define options['inputDefaults'] at site level than that at each form
aWebDeveloper
  • 31,131
  • 35
  • 150
  • 224
11
votes
3 answers

CakePHP 2.1 - How to properly use DISTINCT in find()

I have a question which is driving me crazy and I have to admit I am not that experienced in CakePHP. As mentioned in this question, Using DISTINCT in a CakePHP find function, using DISTINCT this way: $this->Model->find('all',…
alieninlondon
  • 860
  • 2
  • 11
  • 33