CakePHP Session Timeout Not as programmed?

I'm experiencing session timeouts in CakePHP quicker than I code. I have this line: 'Session' => [ 'defaults' => 'php', 'timeout'=>24*60*60*30//for one month ], ....But it is logging out around 30 minutes of inactivity I believe, at least it feel

The database does not have enough time to record the recording

I am working on a project on CakePHP 2.4.4. And I am facing the following problem: My Vendor Uploading Class calls one function newImage which creates a new image. When I upload more than one image for example five times, this function is being calle

Html tags do not work in Cakephp Mail

I'm using cakephp2.4.5 & I have created view as: <?php echo $this->Session->flash();?> <?php echo $this->Form->create('Feedback', array('controller' => 'Feedbacks', 'action' => 'sendmail')); echo $this->Form->email('ma

Get the button value and save in db on click

I want to update a field in db as 1 or 0 when i click on yes or no button.. <td> <input type="button" onClick="save();" value="Yes"> <input type="button" onClick="save();" value="No&quo

Cakephp 3: Several forms per page for the same model

I have a page where there are multiples forms generated with the FormHelper that aim at modifying the same entity. The problem is: validation errors will show up on both forms. With cakephp 2, this problem was solved by extending Models (see : http:/

Cakephp 2.61 and the comboboxes

Using Cakephp 2.6.1, I have successfully captured and stored single characters in my database using the following code echo $this->Form->input('grade', array('options' => array( 'G' => 'Good', 'P' => 'Pass','R'=>'Practice Required','F'=&

Write a request for a box pop up in cakephp

I want my mysql query to be executed when the user clicks on delete button on the pop up box.I have button named 'Delete' and when the user clicks on the button a confirm box pops up and if the user clicks ok then the data should be deleted.I am not

CakePdf plugin wkhtmltopdf binary was not found

I am trying to implement this plugin In my view methods I have add this code public function view($id = null) { $this->User->id = $id; $this->autoRander="false"; if (!$this->User->exists()) { thro

How to connect CakePHP to a Postgres database?

I'm just starting with CakePHP, I went through the blog tutorial without trouble but would now like to try it with a proper DBMS like postgres. I tweaked the database.php file to point to a database I created in my local postgres instance: class DATA

cakephp: saving on multiple models using a form

I have one form that saves a person with many parts and many colors but it's not saving the parts and the colors; only saving the person(main model). On my list view, part of script: echo $this->Form->input('Person.person_name', array('required' =&g

how to load a component into Lib or Vendor files

i am working on a cakephp 2.3. i want to load Email component into my class which is in Lib folder. same case for Vendor files too at the moment what i am doing is this.. App::uses('EmailComponent', 'Controller/Component'); class Email { public stati

CakePHP configuration of the dependent AJAX drop-down list

I have done a lot of research, tried to apply a few different examples but it seems that nothing really works. So I have the following 3 models: Customers, Projects and Events. Customers have many Projects and Projects have many Events. While creatin

Common reasons behind 403 errors

Below are two functions that I'm positive are written correctly. Problem is, that there are times, when my Session does not time out, but the AJAX request returns 403 error (also happens with some other functions without any pattern). Stack overflow

CakePHP: the validation message is not displayed

I'm new to cakePHP and I've made one simple form following some tutorial. On this html form I've used validation. Now the problem is that validation is working but the message is not displaying which i want to display. I try the code below, Model pub

Logging the current file name

Is there a way to log the filename/class name/function and/or line number, where the $this->log was called? I could not find this in the documentation for $this->log or CakeLog::write ().Yes, you can use the default PHP constants for this. For examp

CakePHP find on a join table

Sorry if this is obvious - I'm trying to do a find() on a join table and failing, whats the correct syntax to do this? Basically I have expenseCode table with a HABTM releationship with the expense table. In my expenseCode model I have: public functi

Database structure to allow users to vote on a topic

I have a Job model and a User model. I need each User to be able to answer several questions based on a particular Job. Each question is marked from 1 to 10 (or unanswered). I believe i need a hasMany through associations, but have been confused by t

CakePHP customize the flash message

Normally, the $this->Session->setFlash(__('My message.')); Will output: <div id="flashMessage" class="message"> My message. </div> How can I change that, so it'll output: <p class="notification> My message.

How to configure the urls of the controller action in cakephp?

I was creating a social networking site, in that each profile page needs to show using a seo friendly url. Now its like i need to add aditioanl string 'jake-web-developer' at the end of this url. result will be like

Make CakePHP work with SQL Server 2008

I can call SQL server 2008 from PHP with Microsoft Drivers for PHP for SQL Server ( But as Sqlsvr driver class is needed to use CakePHP with SQL server 2008, I got the driver file from follo

CakePHP i18n / i10n Routing

Update: I'm using a shared CakePHP lib across several apps (with all of them living in subdomains). They're not all nested the same; so, for example, on the filesystem I might have: /foo .htaccess /1.0 (app) /1.1 (app) /1.2 (app) ... /bar .htaccess /

CakePHP ACL - How to get group permissions only?

I just want group only permissions - I don't need user based permissions. The cake 1.3 manual ( says: In case we want simplified per-group only permissions, we need to implement bindNode() in

CakePHP Routing assistance

I have a users module and few actions like wall, dishes, restaurants, photos. I wanna set up a routing like something like this**{userId or Username}**/wall => *should route to wall() action***{userId or Username}**/di

How to make some pages unavailable when a user is logged in

In CakePHP we can use $this->Auth->allow('someMethod'); to make a page viewable without having to login. How do I make some the same page is not viewable when a user is logged in? An example of this would be a register page which we want to be acces