Questions tagged [cakephp]

CakePHP is an open-source web, rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly known design patterns like MVC and ORM within the convention over configuration paradigm.

CakePHP

CakePHP is an MIT-licensed rapid development framework for that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly-known design patterns like and within the "convention over configuration" paradigm.

Security

CakePHP comes with built-in tools for input validation, protection, Form tampering protection, prevention, and prevention, helping you keep your application safe & secure.

Hints

  1. To start learning this framework, there is a tutorial (CakePHP 3) / (CakePHP 2) included in its documentation. It is a very good introduction to the basics of CakePHP.

  2. Your question should name the CakePHP version you're using. Additionally it should contain a specific cake version, consider using the version-specific tag in addition to the major version tag.

Versions

Active and stable branches

, , , , , , , , .

No longer supported versions

, , , , , , , , ,

Plugins:

Additional resources

  1. Manual https://book.cakephp.org
  2. API https://api.cakephp.org
  3. Video Tutorials https://tv.cakephp.org
  4. Articles https://bakery.cakephp.org
  5. Online Training https://training.cakephp.org/
  6. Plugins https://plugins.cakephp.org
  7. Releases https://github.com/cakephp/cakephp/tags
  8. Issues https://github.com/cakephp/cakephp/issues
  9. Inflector: https://inflector.cakephp.org/

Get Support

  1. Slack https://cakesf.herokuapp.com/
  2. IRC https://webchat.freenode.net/?channels=#cakephp
  3. Forum https://discourse.cakephp.org/

Migration Guides If you are going to migrate from one major branch of CakePHP to another, you could check out this link and this link that lists migration guides.

31338 questions
107
votes
3 answers

"[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log

I am using Apache/PHP/MySQL stack. Using as framework CakePHP. Every now and then I get a blank white page. I can't debug it through Cake, so I peek in the apache error.log and here's what I get: [Wed Oct 12 15:27:23 2011] [notice] child pid 3580…
mgPePe
  • 5,205
  • 12
  • 46
  • 78
94
votes
6 answers

Set Response Status Code

I have an API call for which I need to be able to run some checks and potentially return various status codes. I don't need custom views or anything, I just need to return the proper code. If the user hasn't passed proper credentials, I need to…
Rob Wilkerson
  • 37,910
  • 41
  • 130
  • 185
76
votes
8 answers

How can I see CakePHP's SQL dump in the controller?

Is there a way that one can cause CakePHP to dump its SQL log on demand? I'd like to execute code up until a point in my controller and see what SQL has been run.
Justin
  • 769
  • 1
  • 6
  • 3
75
votes
2 answers

Fat models, skinny controllers and the MVC design pattern

I just read a blog post that explains MVC with a banking analogy. I have a few months of experience with web application development with an MVC framework (CakePHP), so I get the basics, but I began to see a theme that made me think I'm taking a…
ryonlife
  • 6,073
  • 14
  • 45
  • 62
73
votes
7 answers

How do you make strings "XML safe"?

I am responding to an AJAX call by sending it an XML document through PHP echos. In order to form this XML document, I loop through the records of a database. The problem is that the database includes records that have '<' symbols in them. So…
JayD3e
  • 1,937
  • 3
  • 20
  • 30
69
votes
9 answers

Best way to document Array options in PHPDoc?

I'm struggling to write readable and easy to understand documentation that describes the multi-tree structure for Array options that are passed to a function. Here is an example array structure. $arr = [ 'fields' => [ 'title' => [ …
Reactgular
  • 43,331
  • 14
  • 114
  • 176
67
votes
15 answers

CakePHP 3.0 installation: intl extension missing from system

Using the CakePHP docs, I am trying to install 3.0-beta2 using composer but I got this error: cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system However, I know for sure that intl is…
Juan Carlos
  • 993
  • 1
  • 8
  • 10
60
votes
25 answers

How to get complete current url for Cakephp

How do you echo out current URL in Cake's view?
Passionate Engineer
  • 8,614
  • 22
  • 84
  • 151
59
votes
4 answers

Generate ER Diagram from existing MySQL database, created for CakePHP

For CakePHP application, I created MySQL database. Which tool to be used to create ER Diagram of database? Fields and relations between tables are created in a way cakePHP likes. thank you in advance!
user198003
  • 10,571
  • 27
  • 90
  • 146
56
votes
8 answers

Can I use one model inside of a different model in CakePHP?

Can I use another Model inside one model? Eg.
useranon
  • 28,142
  • 29
  • 92
  • 144
56
votes
9 answers

How to check not in array element

I am trying to check if an element is not in array than want to redirect page: My code is as below: $id = $access_data['Privilege']['id']; if(!in_array($id,$user_access_arr)) { $this->Session->setFlash(__('Access Denied! You are not eligible…
s4suryapal
  • 1,627
  • 1
  • 16
  • 25
56
votes
9 answers

symfony vs cakephp

What is conceptually the difference between symfony and cakephp?
diego
56
votes
13 answers

PHP Fatal error: Class 'PDO' not found

PHP Fatal error: Class 'PDO' not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177 PHP INFO: PDO PDO support => enabled PDO drivers => sqlite, sqlite2, mysql pdo_mysql PDO Driver for MySQL =>…
Amanada Smith
  • 1,623
  • 9
  • 27
  • 41
51
votes
6 answers

CentOS: Enabling GD Support in PHP Installation

How do I go about enabling GD Support in a CentOS Installation?
AKKAweb
  • 3,717
  • 4
  • 29
  • 59
50
votes
22 answers

What is the equivalent to getLastInsertId() in Cakephp?

If I do getLastInsertId() immediately after a save(), it works, but otherwise it does not. This is demonstrated in my controller: function designpage() { //to create a form Untitled $this->Form->saveField('name','Untitled Form'); echo…
useranon
  • 28,142
  • 29
  • 92
  • 144
1
2 3
99 100