In my CakePHP 3.10 application, the redirects are changing the protocols and breaking the app. This is being deployed to an App Service (PHP 7.4) in Azure. I’m not seeing this on another LAMP stack (RHEL, Apache 2.4, PHP 7.3, https configured) on premise. Example, logging out of the application. During inspection of the traffic (via Edge’s > Inspect >
Tag: cakephp-3.0
cakePHP use of I18 Time addMinutes function updates every related variable, not just the current instance
I’ve been trying to set start times for different flights of competitors. The addMinutes function seems to update every variable associated with the “ONE” I’m trying to alter. Is this the expected result, or am I missing something really simple? Thanks for your assistance, srcControllerTestsController.php (line 89) ‘BTIME: 9/14/21, 6:09 PM USETIME: 9/14/21, 6:09 PM’ ‘ MYTIME: 9/14/21, 6:24 PM
How do I manage read and write AWS Aurora host endpoints in CakePHP?
I am working with a CakePHP based API that utilizes AWS Aurora to manage our MySQL database. The CakePHP application has many large read queries that that requires a separate Reader Endpoint to not exhaust the database resources. The way this works is that AWS gives you separate endpoints to use in the host field when you connect CakePHP to
One particular id at first and after all ids in desc order
I need to get one particular id at first and, after that, all ids in descending order. This is what I have done but when I uncomment that order line it won’t work, Answer Just replace this line with your order by condition
array_key_exists() expects parameter 2 to be array, null given – Cakephp 3
Friends, I appreciate any comments. I’m having problems with array_key_exists. I need to check if a product already exists in the shopping cart. I’m doing it this way: I received the error below, but now with the update it no longer exists. But the function still doesn’t help me. The product is added to the cart even if it has
Where to put custom SQL code in CakePHP 3?
I’m building an application in CakePHP 3. It uses a number of legacy databases which are not built in the Cake conventions. I do not want to use any of the ORM features Cake provides, as it’s more tedious to set up all the relations than just write “Raw SQL”. We are also not going to make any changes to
Retrieve associated model from different database using cakephp 3
I’m developping an application that will use two databases: A main database to store the app’s data and a second one where I’ll check usernames and other read-only stuff. So I set up two different connections in my app.php: After that I put a method in my Model/Table/UsersTable.php so cake will know that this table uses a different database: I’m
Clone entity and all related entities in CakePHP 3
In my CakePHP 3 app, I have a somewhat elaborate tree of entities that I need to clone and save. The root of the structure is a Questionnaire, a Questionnaire hasMany Questions, each Question hasMany Fields, etc. (it goes deeper). Now I want the user to be able to define a new questionnaire by copying an old one. Then they
Virtual fields with Cakephp 3
I need to have a virtual property in my user entity. I followed the CakePHP book. UserEntity.php In a controller I followed exactly the book and I only get a null value. Answer According to @ndm, the problem was due to a bad file naming. I named the user entity class UserEntity.php. The CakePHP name conventions says that: The Entity
installing cakephp 3 manually, without composer
I need to install CakePHP 3 in an old-fashioned upload-unzip-run way. The archive I’ve downloaded from cakephp/cakephp/tags does not contain the default folders like webroot, Model etc., which means it’s not complete. The official documentation does not cover this. Here’s a relevant Github issue I found, but the person ends up still using Composer. There’s also cakephp/app and it seems