CakePHP 2.8 is compatible with, and tested against PHP7

CakePHP 2.6 error : Error: Cannot use ‘String’ as class name as it is reserved

discussion and solution: https://github.com/ZoneMinder/ZoneMinder/issues/1227

migration guide: http://book.cakephp.org/2.0/en/appendices/2-8-migration-guide.html

releases: https://github.com/cakephp/cakephp/releases

Deprecated (16384): Using key `action` is deprecated, use `url` directly instead. [CORE\Cake\View\Helper\FormHelper.php, line 383]

solution: http://stackoverflow.com/questions/35746058/using-key-action-is-deprecated-use-url-directly-instead-in-cakephp



On every page

Nick Cave - 20,000th day on the planet Earth

PHP sessions default timeout

Q: would a user eventually be “logged out” after some time of inactivity?
A: It depends on the server configuration or the relevant directives (session.gc_maxlifetime) in php.ini. Typically the default is 24 minutes (1440 seconds), but your webhost may have altered the default to something else.

http://stackoverflow.com/questions/9904105/php-sessions-default-timeout

CakePHP – session timeout: http://stackoverflow.com/questions/20348038/cakephp-session-timeout



ls everything OK um... Mrs Simone or whatever you know.

Nick Cave - 20,000th day on the planet Earth

CakePHP 3

For developers eho like Cake:

The CakePHP core team is proud to announce the immediate availability of CakePHP 3.0.1

Requirements:
PHP 5.4.16 or greater.
// Your host provides PHP 5.3? Do you like to use CakePHP 3? I’m sorry.
mbstring extension
intl extension

documentation: http://book.cakephp.org/3.0/en/index.html



Yeah we do have that somewhere don't we

Nick Cave - 20,000th day on the planet Earth

CakePHP – User Management , my opinion about CakePHP

Zend Framework is the PHP Framework for the developers who like the big brand name.

Laravel is the PHP Framework For Web Artisans.

CakePHP is the PHP Framework for the developers who like the Cake.

CakePHP was famous few years ago. The framework developers follow the trend, the PHP version slowly.
Fortunately CakePHP 3 is stable now.

CakePHP 2 – User Management: http://usermgmt.ektanjali.com/

CakePHP 3 – User Management: http://cakephp3-user-management.ektanjali.com/



You were walking up this ramp to go on stage. It was like a scene from a film.

Nick Cave - 20,000th day on the planet Earth

CakePHP 2 – Load model on the fly

1. Using loadModel

<?php App::uses('AppModel', 'Model'); 
class Foo extends AppModel { 
public $useTable = false; 
function __construct($tablen) { 
//first check table exists if(!check_table_exists($table)){ 
$this->useTable = 'comments_' . $tablename["id"];
}
parent::__construct();
}

function check_table_exists($table) {
$dbo = $this->getDataSource();

try {
$result = $dbo->execute('DESCRIBE ' . $table);
} catch (Exception $e) {
$result = false;
}
return $result;
}
}

$this->loadModel(‘Foo’, “footable”);

2. You can instantiate the model directly

$model_1 = new Model(array('table' => 'the_table', 'ds' => 'default'));
$model_2 = new Model(array('table' => 'the_table', 'ds' => 'database2'));

source: http://stackoverflow.com/questions/22514836/cakephp-load-model-on-the-fly-using-a-different-datasource

3. MISC.

A note on difference between app:import and loadmodel in CakePHP: http://www.devarticles.in/cakephp/a-note-on-difference-between-appimport-and-loadmodel-in-cakephp/

Using App::uses (instead of App::import) in a CakePHP: http://stackoverflow.com/questions/8994514/using-appuses-instead-of-appimport-in-a-cakephp-2-1-plugin



Yeah. While Warren is doing something

Nick Cave - 20,000th day on the planet Earth

CakePHP 2 disable beforesave at saving Model

If Model has beforeSave method

$this->User->save(null, array('validate' => false, 'callbacks' => false));


you can be kind of taken away...

Nick Cave - 20,000th day on the planet Earth

CakePHP : difference between $this->data and $this->request->data?

$this->data was used till cakephp 1.3

$this->request->data has replaced the $this->data array from cakephp 2.x onwards.

For backward compatibility $this->data is also still supported.

$this->request represents CakeRequest object and is accessible in Controller, Views and Helpers.

Request and Response objects: http://book.cakephp.org/2.0/en/controllers/request-response.html

source: http://stackoverflow.com/questions/10164203/difference-between-this-data-and-this-request-data



that is really um... Mm.

Nick Cave - 20,000th day on the planet Earth

CakePHP 1.x, 2.x, 3.x PHP, MYSQL Requirements

CakePHP min. PHP version min.MySQL version Link
1.3 PHP 4.3.2 or greater. Yes, CakePHP works great on PHP 4 and 5. MySQL (4 or greater) http://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Requirements.html
2.x PHP 5.2.8 or greater. MySQL (4 or greater) http://book.cakephp.org/2.0/en/installation.html
3.x PHP 5.4.19 or greater. MySQL (5.1.10 or greater) http://book.cakephp.org/3.0/en/installation.html

Run Cakephp, run !



I wanna feel your heartbeat

Nick Cave - 20,000th day on the planet Earth