Empornium/Luminance

schedule error

Closed this issue · 2 comments

nrg62 commented

Hello,

my config debian 9.8
mariadb 10.1
php 7.0

How to fix this error ?

/usr/bin/php /var/www/Luminance/application/entry.php schedule

Schedule quarter: 0
Running daily functions
Updating daily site stats
Disable inactive users
Disable unconfirmed
Demote users
Caught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'GOOD_PERV' in 'where clause'
#0 /var/www/Luminance/application/Services/DB.php(180): PDO->prepare('SELECT ID FROM ...')
#1 /var/www/Luminance/application/Services/OldDB.php(36): Luminance\Services\DB->legacy_query('SELECT ID FROM ...')
#2 /var/www/Luminance/application/Legacy/sections/schedule/index.php(802): Luminance\Services\OldDB->query('SELECT ID FROM ...')
#3 /var/www/Luminance/application/Core/LegacyHandler.php(41): require('/var/www/Lumina...')
#4 /var/www/Luminance/application/Core/LegacyHandler.php(18): Luminance\Core\LegacyHandler->load_section('schedule')
#5 /var/www/Luminance/application/Core/Master.php(306): Luminance\Core\LegacyHandler->handle_legacy_request('schedule')
#6 [internal function]: Luminance\Core\Master->legacy('schedule')
#7 /var/www/Luminance/application/Core/Master.php(276): call_user_func_array(Array, Array)
#8 /var/www/Luminance/application/Core/Master.php(161): Luminance\Core\Master->handle_request(Object(Luminance\Core\Request))
#9 /var/www/Luminance/application/entry.php(34): Luminance\Core\Master->run()
#10 {main}
--- ERROR during CLI execution ---
Corresponding HTTP response status: 500
Error message: Internal Server Error

You need to configure the user classes in your settings.ini

[users]
classes = 'APPRENTICE=2,PERV=3,GOOD_PERV=4,DONOR=20,SEXTREME_PERV=5,SMUT_PEDDLER=6,ADMIN=1,SYSOP=15'

It doesn't matter if the names don't match but the numbers should correspond to the ID column in your permissions table for the various user classes. If you want to "disable" one of them I'd recommend setting it to 0. For example:

[users]
classes = 'APPRENTICE=0,PERV=0,GOOD_PERV=0,DONOR=0,SEXTREME_PERV=0,SMUT_PEDDLER=0,ADMIN=1,SYSOP=2'

The various places where these are used throughout the legacy code will be refactored in an upcoming release.

nrg62 commented

fixed the issue thanks