Table of Contents

Upgrading From CakePHP3 Based Install

Introduction

Preparing A Fallback

Install CakePHP 8.1

#Add php8.1-extension_name
sudo apt-get -y install php8.1-cli php8.1-mysql php8.1-gd php8.1-curl php8.1-xml php8.1-mbstring php8.1-intl php8.1-sqlite3 
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    #
    #       # With php-fpm (or other unix sockets):
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    #       # With php-cgi (or other tcp sockets):
    #       fastcgi_pass 127.0.0.1:9000;
}

Porting Actions

sudo su
mysql -u root
create database rd_cake3;
GRANT ALL PRIVILEGES ON rd_cake3.* to 'rd_cake3'@'127.0.0.1' IDENTIFIED BY 'rd_cake3';
GRANT ALL PRIVILEGES ON rd_cake3.* to 'rd_cake3'@'localhost' IDENTIFIED BY 'rd_cake3';
exit;
sudo mv /var/www/rdcore /var/www/rdcore_cake3
sudo su
mysql -u root
drop database rd;
create database rd;
exit;
sudo mysql -u root rd < /var/www/html/cake4/rd_cake/setup/db/rd.sql

Running the porting script

cd /var/www/html/cake4/rd_cake && bin/cake migrate

Finally you need to copy the older files from the old folders

/var/www/html/cake3/rd_cake/webroot/img/realms
/var/www/html/cake3/rd_cake/webroot/img/dynamic_details
/var/www/html/cake3/rd_cake/webroot/img/dynamic_photos
/var/www/html/cake3/rd_cake/webroot/img/access_providers
/var/www/html/cake3/rd_cake/webroot/img/hardwares
/var/www/html/cake3/rd_cake/webroot/files/imagecache