cakephp

How to increase the login time for cakephp 2

扶醉桌前 提交于 2020-01-17 13:57:22
问题 Can you please let me know how to increase the session expiry time for CakePHP 2? Currently, i set the configuration as bellow. Configure::write('Session', array( 'defaults' => 'php', 'timeout' => 129600, // The session will timeout after 30 minutes of inactivity 'cookieTimeout' => 129600, // The session cookie will live for at most 24 hours, this does not effect session timeouts 'ini' => array( 'session.gc_maxlifetime' => 129600 // 36 hours ) )); But, these settings not work and session

dispatcher calls code from another app occasionally

拥有回忆 提交于 2020-01-17 12:36:46
问题 We just upgraded some of our apps (from 1.3) to cakephp 2.2 and refactored the code. our basic server setup looks like htdocs/subdomain.domain/cakeapp1/... htdocs/subdomain.domain/cakeapp2/... sometimes we receive errors, which are due to the problem, that cake internally decides to call code from within another app folder. so, we call a route from cakeapp1 and all of a sudden, in the middle of the stack trace, cake calls files from cakeapp2. so, although no code in cakeapp1 references the

cakephp: using a join for search results

倾然丶 夕夏残阳落幕 提交于 2020-01-17 07:52:12
问题 I've completely confused myself now. I have three tables: applicants , applicants_qualifications , and qualifications . In the index view for applicants, I have a form with a dropdown of qualifications. The results should be a list of applicants with that qualification. So I need the table of applicants on the index view to be based on a join, right? If I add this to my applicants_controller: $options['joins'] = array( array( 'table' => 'applicants_qualifications', 'alias' => 'q', 'type' =>

cakephp is querying extra column and I can't figure out why

落花浮王杯 提交于 2020-01-17 07:37:11
问题 I'm having some trouble getting cakephp to properly query. Cake is trying to find a non-existant column in one of my tables and I can't figure out why. I have two tables involved with this ; votes and posts. Users can vote on a post. Here are the tables Table votes post_id | user_id | vote table posts post_id | tite | body | created | modified | user_id | vote_total When a user votes on a post their vote gets placed in the votes table, and the vote_total is increased/decreased by their vote.

CakePHP 3.0 not running on other machines

主宰稳场 提交于 2020-01-17 06:12:07
问题 I've developed a small project on a machine, using CakePHP 3.0, and I need it to run on another machine. I've tried to install it on several other machines. If I run the composer to install the CakePHP 3.0, then I copy my stuff to overwrite it, the project works. I've tried this on two machines and had no problem so far. If I don't run the composer , and just copy the stuff to the target machine, it gives me the following error. I've tried this on 3 machines, and every machine gives me this:

How to correctly set multiple associations between 3 models (CakePHP)

霸气de小男生 提交于 2020-01-17 05:16:06
问题 So I'm trying to work this out last night, and after thinking myself around in circles a few times decided I need some help. I did post a question about an ID field not being filled in but it got too long winded and confusing, and I realised the problem was probably based on the associations. I'm working on a customer database. For larger business customers the relationships get a little complicated. I have 3 models, Customer, CustomerAddress and CustomerContact. A customer can have many

How to keep ID Model in another Model page in Cakephp 2

丶灬走出姿态 提交于 2020-01-17 04:21:05
问题 I have two tables Location and Car. What I want is, when I click on the picture of the car ( View/Cars/view.ctp ), redirect to the location add form ( View/Locations/add.ctp ) while keeping the ID of the car I've previously chosen. LocationsController: <?php App::uses('AppController', 'Controller'); class LocationsController extends AppController { public $components = array('Paginator', 'Session'); public $helpers = array( 'Js', 'GoogleMap' ); public function index() { $this->Location-

CakePHP translations in one or multiple po files and performance

穿精又带淫゛_ 提交于 2020-01-17 04:20:09
问题 Does making the i18n tool of CakePHP making its po file in single one file better than multiple files. Here I meant by performance. Personally, I prefer single one file I regarded it easier to translate the application, but I mean the performance of the application on the server. 回答1: I think that one file is better than multiple files, due to the performance used when opening and closing multi files is greater than opening one file regarding-less its size. 来源: https://stackoverflow.com

CakePHP translations in one or multiple po files and performance

不羁岁月 提交于 2020-01-17 04:20:06
问题 Does making the i18n tool of CakePHP making its po file in single one file better than multiple files. Here I meant by performance. Personally, I prefer single one file I regarded it easier to translate the application, but I mean the performance of the application on the server. 回答1: I think that one file is better than multiple files, due to the performance used when opening and closing multi files is greater than opening one file regarding-less its size. 来源: https://stackoverflow.com

Missing Controller Error on remote server using Beta 3

雨燕双飞 提交于 2020-01-17 03:59:14
问题 I've been working on a project on my local machine (running OS X with Cake server) using CakePHP 3 Beta. Sometimes I copy this project to a remove test server (running Ubuntu with Apache). Last time I copied all the files to the remote server, Beta 2 was the newest version, and the site was running just fine on both machines. When Beta 3 came out, I updated my local project and continued working on it on the local machine without running into any issues. Today I copied the whole project to