Tag Archives: cakephp

Speeding up CakePHP

Questions: I’ve been a keen fan and user of CakePHP for about 2.5 years now, but the main bugbear that most fellow developers level at the framework is that it’s slow, and the dispatch cycle takes too long to make it a viable solution for production environments. I’m hoping that this question will inspire people… Read More »

CakePHP ACL Database Setup: ARO / ACO structure?

Questions: I’m struggling to implement ACL in CakePHP. After reading the documentation in the cake manual as well as several other tutorials, blog posts etc, I found Aran Johnson’s excellent tutorial which has helped fill in many of the gaps. His examples seem to conflict with others I’ve seen though in a few places –… Read More »

The request has been black-holed – CakePHP

Questions: I’m using CakePHP’s SecurityComponent. And it’s very essential as it saves forms from CSRF attacks. My project has total 10-12 forms and this is my first CakePHP project. After enabling SecurityComponent I was in a bit trouble but could get rid off after some careful minutes. This is the last form of my project… Read More »

Create temporary table in CakePHP and load it as a Model

Questions: My plan is to create a temporary table using the $this->Model->query(); method then load it as a Model but I’m getting an error staying “Missing Database Table”. Turning on debug to level two shows that the temporary table is success fully created but for some reason, when I try and load it as a… Read More »

Pagination Sort in Cakephp 3.x

Questions: In cakephp 3.x i can’t do paginate order in a find This is my controller: //AgentsController.php public function show() { $agents = $this->Agents->find() $this->set(‘agents’, $this->paginate($agents)); } And here part of my view //show.ctp <!– ……. –> <table class=”table table-striped”> <thead> <tr> <th> <?php echo $this->Paginator->sort(‘full_name’, ‘Nome’, array(‘escape’ => false)); ?> </th> <th> <?php echo… Read More »

How do I completely disable caching in Cakephp?

Questions: So I opened the cache floodgates in my Cakephp app and now I want to close them… I’ve done pretty much everything I can: delete all files in the tmp folder (but not the folders), turned ‘Cache.disable’ on in the core.php file in my app, have tried clearing the cache from within some controllers… Read More »

CakePHP Shared core for multiple apps

Questions: On my local setup I have a load of different CakePHP websites. I’m using a Mac so the folder structure is something like ~/Users/cameron/Sites/sample-website and then within each of these websites I will have the typical Cake folder and App folder. What I would like to do is have just a core cake folder… Read More »

cakePHP 3.0 uploading images

Questions: I want to upload images in my cakephp 3.0 app. But I get the error message: Notice (8): Undefined index: Images [APP/Controller/ImagesController.php, line 55] Are there already some examples for uploading files (multiple files at once) in cakePHP 3.0? Because I can only find examples for cakePHP 2.x ! I think I need to… Read More »