CMS 1.8 to 2 version upgrade step by step

CMS Version

1.8.13 to 2.3.7

Installation Method

Custom install (xampp)

Operating System

Windows

Backup the database with phpmyadmin or mysql commands. This process must be done absolutely.
If the backup cannot be retrieved due to the size of the database, run the database cleanup commands:

truncate stat;
optimized table stat;

Statistics will be cleared when these commands are entered into the database as a SQL query.

Rename the "c:\xampp\htdocs\xibo" folder to “xibo_old”.
Extract the new version with the name “xibo” from the zip file.

Copy the file “c:\xampp\htdocs\xibo_old\web\settings.php” to the “c:\xampp\htdocs\xibo\web” folder.
In “c:\xampp\htdocs\xibo_old\web” copy the folder where the contents are uploaded to “c:\xampp\htdocs\xibo\web”.
Check the change by entering the web interface. The web interface will give an upgrade warning.

Operations to be done in the "c:\xampp\htdocs\xibo" folder.
1- Copy the “app” folder from “vendor\robmorgan\phinx” to “vendor\bin”
2- Copy the “src” folder from “vendor\robmorgan\phinx” to “vendor\bin\app”
3- From “vendor\bin\phinx”
Posted by:

$app = require DIR . ‘/…/app/phinx.php’;
Changed:
$app = require DIR . ‘/app/phinx.php’;
4- Change the line “$autoloader” in “vendor\bin\app\phinx.php”:
Posted by:
$autoloader = require DIR . ‘/…/src/composer_autoloader.php’;
Changed:
$autoloader = require DIR . ‘/src/composer_autoloader.php’;

If XMR configuration is available;
Copy the file “c:\xampp\htdocs\xibo_old\vendor\bin\config.json” to the path “c:\xampp\htdocs\xibo\vendor\bin\config.json”.

Open an administrator command screen in the "c:\xampp\htdocs\xibo" folder.
Enter the command “c:\xampp\php\php.exe vendor\bin\phinx migrate -c phinx.php”.
Operations will begin, Database migrate will be done.

Possible Errors:

  • “SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column” Code Answer
    Solution:
    As a SQL query to the database:

“SET SQL_MODE=‘ALLOW_INVALID_DATES’;”
enter your command.

  • SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for ‘createdDt’
    Solution:
    Lines 13-20 of the file “20180131122645_one_region_per_playlist_migration.php” in the db/migrations folder:

$playlist = $this->table(‘playlist’);
$playlist
/->addColumn(‘regionId’, ‘integer’, [‘null’ => true])/
->addColumn(‘createdDt’, ‘datetime’, [‘default’ => ‘2021-01-01 00:00:00’])
->addColumn(‘modifiedDt’, ‘datetime’, [‘default’ => ‘2021-01-01 00:00:00’])
->addColumn(‘duration’, ‘integer’, [‘default’ => 0])
->addColumn(‘requiresDurationUpdate’, ‘integer’, [‘default’ => 0, ‘limit’ => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY])
20 ->save();
change shape.

The web interface can now be accessed.

Linux operating system users only need to change the file paths.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.