lovedigit
👽 Chevereto Freak
▶ Reproduction steps
The cli database update command
This is the error shown when attempting to update database using cli command.
env.php file:
Note the table prefix is "lens_" in env file, but in error message it is looking for chv_
📃 Error log message
- Remove app/vendor from your Chevereto V3 installation
- Provide Chevereto V4 files on top of Chevereto V3 installation
- Switch to PHP 8
- Proceed with database update
The cli database update command
app/bin/legacy -C update
detects wrong table prefix even when table prefix is entered in env.php file.This is the error shown when attempting to update database using cli command.
env.php file:
Note the table prefix is "lens_" in env file, but in error message it is looking for chv_
Code:
GNU nano 6.2 app/env.php
<?php
return [
'CHEVERETO_DB_HOST' => 'localhost',
'CHEVERETO_DB_NAME' => 'redacted',
'CHEVERETO_DB_PASS' => 'redacted',
'CHEVERETO_DB_PORT' => '3306',
'CHEVERETO_DB_USER' => 'redacted',
'CHEVERETO_DB_TABLE_PREFIX' => 'lens_',
'CHEVERETO_ENCRYPTION_KEY' => 'redacted',
];
📃 Error log message
Code:
PDOException thrown in /var/www/html/app/src/Legacy/G/DB.php:151
# Message [Code #42S02]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'redacted.chv_albums' doesn't exist
# Incident ID:633856a6adf43
# Time
2022-10-01T15:03:02+00:00 [1664636582]
# Stack trace
------------------------------------------------------------
#0 /var/www/html/app/src/Legacy/G/DB.php:151
{main}()
------------------------------------------------------------
#1 /var/www//html/app/src/Legacy/G/DB.php:151
PDOStatement->execute()
------------------------------------------------------------
#2 /var/www/html/app/src/Legacy/G/DB.php:166
Chevereto\Legacy\G\DB->exec()
------------------------------------------------------------
#3 /var/www/html/app/src/Legacy/G/DB.php:222
Chevereto\Legacy\G\DB->fetchAll()
------------------------------------------------------------
#4 /var/www/html/app/src/Legacy/G/DB.php:209
Chevereto\Legacy\G\DB::queryFetch()
------------------------------------------------------------
#5 /var/www/html/app/legacy/install/installer.php:931
Chevereto\Legacy\G\DB::queryFetchAll()
------------------------------------------------------------
#6 /var/www/html/app/legacy/commands/update.php:18
require_once(string(length=55))
------------------------------------------------------------
#7 /var/www/html/app/legacy/entrypoints/cli.php:53
require_once(string(length=53))
------------------------------------------------------------
#8 /var/www/html/app/bin/legacy:13
require_once(string(length=53))
------------------------------------------------------------
Last edited: