Questions tagged [cakephp-2.8]

For use with cakephp2.8 specific problems. For more general questions use cakephp tag

For use with cakephp2.8 specific problems. For more general questions use cakephp tag

36 questions
2
votes
1 answer

Upgrade cakephp 2.6 to 2.8 to work php 7

I have a cakephp website on 2.6 and want to run it on php 7. Will it work if I upgrade cakephp to 2.8? I have shared server therefore I cannot have php 5.*.
Xic Om
  • 53
  • 2
  • 11
2
votes
1 answer

Unbind HasAndBelongsToMany in CakePHP 2 doesn't unbind the model

How to unbind HasAndBelongsToMany relationship in CakePHP 2.8? I have this model that is connected to Task model (N:M relationship). class Date extends AppModel { public $name = 'Date'; public $displayField = 'rdate'; public $actsAs =…
jnemecz
  • 3,171
  • 8
  • 41
  • 77
2
votes
1 answer

Not able to include and use component's method in controller

I am using CakePHP 2.8.3 and trying to use this component into my controller but I am getting this error, Does anybody experienced same please help. Fatal Error Error: Call to a member function header() on a non-object File:…
Keyur Padalia
  • 2,077
  • 3
  • 28
  • 55
1
vote
0 answers

script stops when require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))).'/lib/Cake/bootstrap.php'); line gets executed

I am using CakePHP 2.8x . In webroot I am calling a php which needs to require require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))).'/lib/Cake/bootstrap.php'); My script gets executed till this line. From this line the script halts…
1
vote
1 answer

Index page showing without css and js

I am new in cakephp (using 2.8.0 verison),I uploaded backup of site then index page showing without css and js. After press "ctrl + U " , Showing missing "Js controller" and "Css controller" not found Here is my code in .htaccess file in webroot…
1
vote
2 answers

Cakephp 2, response body content type not working

$this->autoRender = false; $this->response->header("HTTP/1.1 200 OK"); $this->response->header("Pragma: public"); $this->response->header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); $this->response->header("Cache-Control: private",…
voskys
  • 121
  • 1
  • 9
1
vote
1 answer

Narrowing occurred during type inference in CakePHP

My CakePHP Version: 2.8.4 PHP: 7.1.12 (FastCGI) I just noticed that the error log is full of this: 2018-01-07 09:05:33 Warning: Warning (2): Narrowing occurred during type inference. Please file a bug report on bugs.php.net in…
EronarDiaras
  • 87
  • 1
  • 4
  • 13
1
vote
0 answers

Cakephp ajax issue on update

I am facing a problem when a try to submit a form data to edit using ajax. when I debug() $this->request->data I get an empty array(). My form is in a modal window, that shows up when the user clicks in a edit button. NB: When is a non ajax way it…
1
vote
2 answers

Cannot load phpseclib library installed with composer in CakePHP application

I would like to use phpseclib librabry in my CakePHP 2.8 application. After installation of all dependencies into app/Vendor directory I am trying to try phpseclib installation. But I am not able to load library: include('Net/SFTP.php'); $sftp = new…
jnemecz
  • 3,171
  • 8
  • 41
  • 77
1
vote
1 answer

CakePHP: Cannot read from a custom cache in 2.8.4?

This is painfully simple, but I cannot determine why it simply will not work as the Cookbook suggests it will. I am getting a blank result when I run the following: Cache::write('req_quals', $value, 'permacache'); Cache::read('req_quals',…
Vael Victus
  • 3,966
  • 7
  • 34
  • 55
1
vote
1 answer

CakePHP: is there a way to make every find('list') return an array ordered?

I'd like every Model->find('list') could return the array ordered by the $displayField set on Model. Is there a way to do this beyond set 'order' => 'Model.display_field ASC' on every find call?
Keoma Borges
  • 683
  • 2
  • 12
  • 27
1
vote
1 answer

Joining tables CakePHP

I have a table batch_detail_process has foreign key batch_detail_id and it is joined with belongsTo in model. Now I want to get the ArticleRatio on the basis of article_id & item_id. My tables foreign keys are as follows: batch_details_processes =…
عثمان غني
  • 2,786
  • 4
  • 52
  • 79
1
vote
0 answers

Perform a subquery within a CakePHP save

I have two database tables: visitors and passes. Visitors includes a field for pass_id, which refers to one of the records in the passes table. The passes table is pre-populated with a list of valid passes. Each visitor must be randomly assigned a…
Kit Grose
  • 1,792
  • 16
  • 16
1
vote
0 answers

Not able to use Vendor into CakePHP 2.8 view files

I am using CakePHP 2.8.3 and using KoolPHP UI library, which is placed in app/Vendor/KoolControls/ app/Vendor/KoolControls/KoolGrid/koolgrid.php app/Vendor/KoolControls/KoolAjax/koolajax.php Now in my view file(.ctp) I am doing these to include the…
Keyur Padalia
  • 2,077
  • 3
  • 28
  • 55
1
vote
2 answers

How do form validation in Cakephp?

I have been trying to do form validation in cakephp. I have a dropdown menu and I want to set it to required to allow the selection of the item in the dropdown menu first before moving to the next page. However, I am unable to do so. I would like to…
developer5Urban
  • 43
  • 1
  • 12
1
2 3