Category: Installation

Installing Cakephp 3 without composer?

Hi all,I use Cakephp 2 from time to time, and recently I want to start coding by using version 3. Is there a method to install Cakephp 3 without using composer? I want to install version 3 in an

#composer
2 Answers

Category: Utility Classes

Http Client: Failed to open stream: HTTP request failed!

I want to post data to an local API written by Node.js:In Cake's controller:$http = new Client(); $response = $http->post('http://localhost:3000/api/generate', [   'title' => 'This i

SOLVED #http #fopen
3 Answers
Ksmacky
Ksmacky

30

Category: Utility Classes

How to use curl requests in Cakephp 3?

Question is how to use curl requests in Cake 3?$ch = curl_init("http://www.foo.com/"); $fp = fopen("example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp

SOLVED #curl
1 Answers
Ksmacky
Ksmacky

30

Category: Utility Classes

Cakephp 2 how to write data to a downloadable CSV file?

Hi,Is there a built in utility class that is able to generate downloadable CSV file from a php data array in Cakephp 2? Thanks

#csv
1 Answers
Harper
Harper

5

Category: Validation

Cakephp 2 how to escape special characters to prevent SQL injection?

Hi, I'd like to know in Cakephp 2 how to escape special characters to prevent SQL injection?For example://input $this->request->data['Model']['name']; // name = 'John "Doe"'I want name fi

SOLVED #sql #injection
3 Answers
Harper
Harper

5

Category: Models & ORM

How to find users between two ages?

I want to find all users between two ages, could someone help me?$age_from = $this->request->query['age_from']; $age_to = $this->request->query['age_to']; //transform to date format?

SOLVED #age #tablerigistry
2 Answers
Kristi
Kristi

137

Category: Debugging

Fatal error: allow memory size exhausted when uploading csv file

Cakephp shows a fatal error about "allow memory size of 268435456 bytes exhausted" when trying to upload a CSV file. The CSV file size is quite big about 100mb per file. My Cakephp applicati

SOLVED #memory #csv #digitalocean #limit
1 Answers

Category: General Discussion

Choosing between CakePHP version 2.X or 3.X?

Hi all,Recently I decided to move to the cakephp framework from Yii 2, and I am new to Cake. I would like to ask you guys which version of cake do you prefer? I have been studying version 2.X and I fe

#version #yii #composer
1 Answers
Ksmacky
Ksmacky

30

Category: Models & ORM

Using cakephp/elastic-search with pagination

How do you use the elastic-search plugin with cake's native pagination?before filter:$this->loadModel('Products', 'Elastic');in controller:$this->paginate = [   'limit' => 10, '

SOLVED #elasticsearch #plugin #pagination
1 Answers

Category: Deployment

Change tmp folder permission when deploying Cakephp application to AWS elastic beanstalk

Hi, This is my first time asking question on Aero Coding.I don't know if someone has done this already.. but I want to change tmp folder permission to writable automatically when overtime I deploy Cak

#aws #beanstalk #file #permission
1 Answers