问题
My website is developed in cakephp 2.7 which uses php.4.4 many years ago.All working fine at that time.
But right now it's not working in capnel. I have checked the issue and error logs. PDO class is not working and meanwhile database query execution is not working.
So i have upgraded my php version to PHP 7.0. Another issues are coming like problem in error handler of cakephp. I searched for this issue and i concluded that cakephp 2.7 is not compatible with PHP 7.0.
So i have to do migration from cakephp 2.7 to cakephp 2.8.
I have searched for the migration but no any link shows clear changes of code from 2.7 to 2.8.
I need proper documentation for the migration.
please anyone suggest some links for migration.
回答1:
Follow these simple steps to upgrade cakephp 2.x.x to any latest version of cakephp 2.x.x.
Till today cakephp 2.10.19 is latest one , so I will guide accordingly
- First of all create backup or your data(eg:Maan.com) and database.
- Make subdomain(eg: CakephpNewVersion.Maan.Com)
- clone latest version of cakephp from git to your new subdomin.
- Extract every thing to subdomin.
- Copy/Owe right these folders from orignal domain to subdomain "Config, Model, View, Controllers, Webroot".
6: Create new database for subdomin and import db back that we took in step 1.
7: Modify subdomain(eg: CakephpNewVersion.Maan.Com)/app/config/database.php according to new database settings.
8: You are good to go , Refresh subdomin and compare everything with main Domain. 9: If everything is as expected then Just vote up this answer and repeat this process to main domin/or just clone directory.
来源:https://stackoverflow.com/questions/55824132/cakephp-migration-from-2-7-to-2-8-in-cpanel