Migration cakephp from PHP version 5.6.35 to php 7.2.3

Hi friends,
I wanted to migrate php 5.6.35 to php 7.2.3 in cakephp 5.6 .As I am new to cakephp can u please help me in step by step precedure to migrate the code base it into php 7.2.3

What version of CakePHP are you using?

Cakephp version 2.6.

2.6 does not support PHP 7.

https://book.cakephp.org/2.0/en/installation.html#requirements

Seems you’ll need to upgrade to at least 2.8 to get support for 7. (It’s not clear from that page which versions support 7.2 vs 7.0.) This will likely require some code changes on your part; I don’t know as I skipped straight from 1.x to 3.x. Migration guides for 2.x are here:

https://book.cakephp.org/2.0/en/appendices.html

See also this topic:

Ok thanks let me try and I will update you

Shall I use any php migration tool to migrate ???if yes then which tool I need to use?

CakePHP migration guides are in the appendices I linked to above. I have no relevant experience with the 2.x tools, so can’t provide anything more than that.

You need to incrementally upgrade your application’s CakePHP version following each applicable migration guide. There is no automated tool for this since the changes required are largely unable to be automated.

Once your application is running on the latest CakePHP 2.x version you can then upgrade your server to PHP 7.2. You can use a tool like https://github.com/PHPCompatibility/PHPCompatibility to show your potential compatibility issues.

I am using cakephp 2.6 version so I need to upgrade it to 2.8 ?

Probably safer to upgrade to 2.10. I’m not 100% sure if 2.8 supports PHP 7.2.

Chances are that it doesn’t since 2.8 was release in February 2016, and PHP 7.2 was only released November 2017 (More than 1.5 years afterwards)

Ok thank you very much

I am using notepad++ for development So should i use notepad++ itself or i need to install any IDE for php7 upgrade???

Notepad++ will work. Although it is very very outdated :slight_smile:

If i use notepad++ will it be easy for migration???

Well, if you can edit code in it, you can do the migration with it :slight_smile:

Ok thank you very much

Hi I upgraded cakephp version 2.10.13 and copied the files to respective controller,model and view and i ran it got working.
Next I wanted to know to put php7.2 ??? new xampp for php 7.2 must be installed or i need to upgrade existing xampp with php7 which i need to download and copy it in php folder???

How to upgrade the PHP running on your server is outside the scope of a CakePHP discussion site, IMO. There should be loads of resources out there about this.

Ok I will check thank you

Hi,

When i copy one of the project files inside cakephp 2.10.13 folder and i renamed it to my custom name and after that i ran it, i got the error called “CAKE ENGINE DEFAULT IS NOT PROPERLY CONFIGURED.ENSURE REQUIRED EXTENSIONS ARE INSTALLED and CREDENTIALS/PERMISSIONS ARE CORRECT”

Some stacktrace specified.
Please can you help me in resolving this as i am new to cakephp.

I searched in google and they said to change the permissions inside tmp folder cache .
So in windows i dont know how to change the permission .
Thanks for your help.