CakePHP 3 Ajax security handling

I have a Javascript function called when the user clicks on a button. There are multiple "bookmark" buttons on the page: javascript:ajax_bookmark_url(1,"http://www.legitsite.com"); How can i make this more secure? I mean a user can just type the ...
more »

2017-04-22 13:04 (0) Answers

Cakephp Bakery Stopped working

I was using cakephp bakery 2.x version and suddenly it stopped working, I am using windows 10 , 64bit version. I swear I didnt touch the database file, I was modifying bakery to work with bootstrap. I can't see to root out the problems. This i...
more »

2017-04-22 10:04 (1) Answers

CakePHP 3 and jQuery Ajax

I am having issues with making an ajax request to my controller. Here is my code: $.ajax({ type:"POST", async: true, cache: false, url:"<?php echo \Cake\Routing\Router::url(array('...
more »

2017-04-21 21:04 (1) Answers

email not delivered yahoo address from cakephp

I am working on CakePHP3 Save form after send email to user. Gmail account receiving email without any obstacle but when sending email to Yahoo address. email not receiving on Yahoo account users. I am using default Cake Email class to send email ...
more »

2017-04-21 09:04 (3) Answers

Php routing always contains Pages

Everytime i try and reference a file or anything, /Pages/ always is at the start of the URL. so i get these errors, and need to change all button links to ../ My routes.php file is as such Router::scope('/', function (RouteBuilder $routes) { ...
more »

2017-04-21 02:04 (1) Answers

CakePHP custom paginator

I made a paginator but the problem is that it shows page number on bottom when there is only one page. So I tried to add if~else but I can't get it to work. "Error: Maximum execution time of 120 seconds exceeded " before <div class="pagination"&...
more »

2017-04-20 16:04 (1) Answers

CakePHP AjaxHandler->respond() returning Error 500

I'm faced with a very annoying issue and I can't figure it out ... I'm currently using PHP 5.6 with CakePHP 2.3 on a pretty big project with three separate repositories (each one using a different CakePHP installation). I'm on an Apache local server...
more »

2017-04-20 16:04 (1) Answers

inner join on cakephp 3

well I need to do a inner join fron 2 tables, but always obtain the same error, I send this from postman, I am trying to recieve the id a execute the inner join with this two tables, now use this example from documentation { "message": "Failed cal...
more »

2017-04-20 07:04 (1) Answers

CakePHP 3 Email Transport - Godaddy with Gmail

I don't know how to troubleshoot this. It works locally but not on my godaddy server. Where can I get all my variable options for SSL I found an answer here I want to try PHPMailer GoDaddy Server SMTP Connection Refused It says I have to use SMTP_...
more »

2017-04-20 04:04 (2) Answers

Parse string to array like CakePHP form data

I am looking for a way to parse strings in an array to an array which has a similar pattern to how CakePHP handles POST data. Or even a function in CakePHP that would do it. UPDATED: Current array: array( 'data[callers]' => (int) 4, 'da...
more »

2017-04-19 22:04 (1) Answers

cakephp 3 method Delete in rest routes

In routes.php I add $routes->extensions(['json']); $routes->resources('News'); When in postman I put url and chose method GET, framework redirect me to index() action, if I chose method POST framework redirect me to add() method, but if I...
more »

2017-04-19 16:04 (1) Answers

Getting associated data in CakePHP 3.x

I have this setup in my Table classes Icases table $this->table('icases'); $this->displayField('name'); $this->primaryKey('id'); $this->belongsTo('Clients', [ 'foreignKey' => 'client_id' ]); $this->hasMany('Documents', [ ...
more »

2017-04-19 16:04 (1) Answers