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
21
votes
8 answers

SplFileInfo::openFile(/app/tmp/cache/persistent/cake_core_cake_console_):failed to open stream:Permission denied in /lib/.../FileEngine.php line 293

I am working on a CakePHP 2 project. It originally started out in 2.0.x and then recently migrated to 2.1.0. Throughout the whole development process, I have been receiving the error message below. It pops up at the top of the page unpredictably. …
penguin egg
  • 1,094
  • 2
  • 10
  • 18
19
votes
3 answers

CakePHP 2.1.x - Run a query without any models in AppController

I am trying to run a query in AppController on a table that has no Model associated with it. I don't want to use a Model cause this query would fire on every request and I guess using a Model would make it a bit slower. I found out in one forum that…
Atul Dravid
  • 1,005
  • 3
  • 14
  • 29
16
votes
3 answers

Where to register event listeners

I'm trying to use the Event System in CakePHP v2.1+ It appears to be quite powerful, but the documentation is somewhat vague. Triggering the event seems pretty straight-forward, but I'm not sure how to register the corresponding listener(s) to…
emersonthis
  • 30,934
  • 52
  • 191
  • 328
12
votes
2 answers

CakePHP 2.x Auth with Two Separate Logins

Back in May, I posted this question. I'm trying to do the same thing again on a different app, but I haven't found a solution to this problem. I do have more information and better code, so I'm hoping you guys can help me sort this out. Use Case:…
deewilcox
  • 792
  • 2
  • 11
  • 24
11
votes
3 answers

cakephp doesn't work url-rewriting on Ubuntu

all. This time I try cakephp, but I have got "URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting". I could know this is apache and .htaccess issues such as…
Shinya Ota
  • 131
  • 1
  • 3
  • 11
10
votes
1 answer

CakePHP Validation depending on other field

I wonder if it is possible with CakePHP validation rules to validate a field depending on another. I have been reading the documentation about custom validation rules but the $check param only contains the value of the current field to validate. For…
Alvaro
  • 37,936
  • 23
  • 138
  • 304
10
votes
2 answers

CakePHP 2.1 making a jquery ajax call with Security component activated

FINALLY found the solution: If anyone have this problem put this in your beforefilter. $this->Security->unlockedActions = array('givestar'); And update libs to Cake 2.3 The problem: I am struggling with the SECURITY component blackholing me on my…
Tom
  • 3,097
  • 4
  • 24
  • 28
9
votes
1 answer

PDOStatement::getColumnMeta returns original table name instead of view name

I am using the CakePHP framework. When returning the results of a query, the framework calls the "experimental" PDOStatement::getColumnMeta to "arrayify" the data when it comes back from the database. However, there are mixed results depending on…
Chuck Burgess
  • 11,430
  • 5
  • 38
  • 73
9
votes
1 answer

CakePHP 2.1: Browser cache vs View cache

I have a question about the way view caching and browser caching work together in CakePHP 2.1. I've just upgraded my app to CakePHP 2.1, and set up HTTP caching using the new $this->response->modified method (which works well): class…
Tomba
  • 1,595
  • 5
  • 20
  • 37
7
votes
2 answers

Cakephp JsonView

I'm using the new CakePHP 2.1 and would like to use the JsonView to make my controller respond on an ajax request created by JQuery on client side. However this should be done automatically with the JsonView according to the documentation.…
Chris De Rouck
  • 127
  • 2
  • 5
7
votes
3 answers

How we setup cakephp without database?

In few project we don't need database, so how we setup cakephp on local machine without modification in database config? Right now what I done ...I created database and modified config file. But my database has no table, its just wastage of…
Pank
  • 11,772
  • 10
  • 30
  • 45
7
votes
4 answers

Self "HABTM" or "HasMany Through" concept confusion

Bounty: +500 rep bounty to a GOOD solution. I've seriously banged my head against this wall for 2 weeks now, and am ready for help. Tables/Models (simplified to show…
Dave
  • 27,341
  • 18
  • 106
  • 177
7
votes
4 answers

Strict standards: Redefining already defined constructor for class Object in path\cake\libs\object.php on line 54

I am trying to configure MS-MSQL database on cakephp (Not mysql). My Wampserver is 2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b on my laptop (which is windows x64-bit. I already invited these two dlls to run sql server…
Fury
  • 4,173
  • 4
  • 40
  • 71
7
votes
8 answers

CakePHP showing blank page

I have a website that is finished and uploaded, at first it works fine but after a while it stops working. By stops working I mean whatever page I go to just shows a blank page, empty source. In Chrome though, I get HTTP Error 500 (Internal Server…
472084
  • 17,079
  • 10
  • 56
  • 78
7
votes
3 answers

CakePHP 2.1 Asset Compress Plugin not creating cached files

I'm using the CakePHP Plugin AssetCompress (v 0.7) which works fine, except that it doesn't cache any files in the directory. This is my asset_compress.ini setup: [General] writeCache = true cacheConfig = false alwaysEnableController = true debug =…
Christian Strang
  • 8,336
  • 4
  • 39
  • 50
1
2 3
67 68